From bc709db733df26145447fdc8a1fa4ae57c7086d4 Mon Sep 17 00:00:00 2001 From: Bucky Wilson Date: Thu, 4 Jan 2018 19:00:07 +1000 Subject: [PATCH] Breif checking for Epiphany browser Only recognises the browser -- not yet looking for a version. --- core/main/client/browser.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/main/client/browser.js b/core/main/client/browser.js index e1b119cc5..f926858d1 100644 --- a/core/main/client/browser.js +++ b/core/main/client/browser.js @@ -646,6 +646,15 @@ beef.browser = { return this.isS4() || this.isS5() || this.isS6() || this.isS7() || this.isS8(); }, + /** + * Return true if Epiphany + * @example: beef.browser.isEph() + */ + isEpi: function () { + return this.isS() && window.navigator.userAgent.match(/Epiphany\//) != null; + }, + + /** * Returns true if Chrome 5. * @example: beef.browser.isC5() @@ -1647,6 +1656,8 @@ beef.browser = { O12: this.isO12(), // Opera 12.xx O: this.isO(), // Opera any version + Ep: this.isEpi(), // Epiphany any version + S4: this.isS4(), // Safari 4.xx S5: this.isS5(), // Safari 5.xx S6: this.isS6(), // Safari 6.x @@ -2379,6 +2390,10 @@ beef.browser = { return 'O' } ; // Opera any version + if (this.isEpi()) { + return 'EP' + } + ; // Ephipany any version if (this.isS()) { return 'S' }