Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 68e2573d authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

detect edge based on chromium

parent 38e1116a
Loading
Loading
Loading
Loading
+12 −8
Original line number Original line Diff line number Diff line
@@ -91,19 +91,23 @@ $(document).ready(function(){
    if (typeof InstallTrigger !== 'undefined') {
    if (typeof InstallTrigger !== 'undefined') {
      return 'firefox';
      return 'firefox';
    }
    }
    else if (!(/*@cc_on!@*/false || !!document.documentMode && !!window.StyleMedia)) {
    else if (window.chrome !== 'undefined') {
      if (navigator.userAgent.includes('Edg')) {
        return 'edge';
        return 'edge';
      }
      }
    else if(window.chrome !== 'undefined') {
      return 'chrome';
      return 'chrome';
    }
    }
    else if (!/*@cc_on!@*/false && !!window.StyleMedia) {
      return 'edge';
    }
    return -1;
    return -1;
  }
  }
  var langCode = navigator.language || "en-US";
  
  
  var browser_urls = {
  var browser_urls = {
    "chrome": "https://support.google.com/chrome/answer/95426",
    "chrome": "https://support.google.com/chrome/answer/95426?hl=" + langCode,
    "edge": "https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine",
    "edge": "https://support.microsoft.com/"+ langCode +"/help/4028574/microsoft-edge-change-the-default-search-engine",
    "firefox": "https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox"
    "firefox": "https://support.mozilla.org/"+ langCode +"/kb/add-or-remove-search-engine-firefox"
  };
  };
  
  
  $("#chrome").attr("href", browser_urls.chrome);
  $("#chrome").attr("href", browser_urls.chrome);
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+1 −1
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@
    <ul>
    <ul>
      <li><a id="firefox">Firefox</a></li>
      <li><a id="firefox">Firefox</a></li>
      <li><a id="edge">Microsoft Edge</a></li>
      <li><a id="edge">Microsoft Edge</a></li>
      <li><a id="chrome">Chromium-based browsers</a></li>
      <li><a id="chrome">{{ _('Chromium-based browsers') }}</a></li>
    </ul>
    </ul>