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

Commit 11d66837 authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

Merge branch 'dev/default-browser' into 'master'

Add text for default browser

See merge request !173
parents 25ec4d5f 86dee6a8
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -288,6 +288,20 @@ babel.compile() {
    pyenv.cmd pybabel compile -d "${REPO_ROOT}/searx/translations"
    pyenv.cmd pybabel compile -d "${REPO_ROOT}/searx/translations"
    dump_return $?
    dump_return $?
}
}
babel.extract() {
    build_msg BABEL extract
    local messages_pot
    messages_pot="${REPO_ROOT}/searx/translations/messages.pot"
    pyenv.cmd pybabel extract -F babel.cfg \
                -o "${messages_pot}" \
                "searx/"
    build_msg BABEL 'update existing message catalogs from POT file'
    pybabel update -N \
        -i "${messages_pot}" \
        -d "${REPO_ROOT}/searx/translations"
    dump_return $?
}

weblate.push.translations() {
weblate.push.translations() {


    # Push *translation changes* from SearXNG (origin) to Weblate's counterpart
    # Push *translation changes* from SearXNG (origin) to Weblate's counterpart
+1 −1
Original line number Original line Diff line number Diff line
@@ -431,7 +431,7 @@ footer {
  color: #c1c1c1;
  color: #c1c1c1;
  padding-bottom: 8px;
  padding-bottom: 8px;
}
}
footer .links > :first-child {
footer .links a {
  margin-right: 8px;
  margin-right: 8px;
}
}
.hidden,
.hidden,
+0 −0

File changed.

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

+35 −0
Original line number Original line Diff line number Diff line
@@ -85,6 +85,41 @@ $(document).ready(function(){
    document.getElementById("image_view_url_link").href = target.dataset.url;
    document.getElementById("image_view_url_link").href = target.dataset.url;
  }
  }


  function getUserBrowser() {
    // Detect user browser
    // https://stackoverflow.com/a/9851769/6490675   
    if (typeof InstallTrigger !== 'undefined') {
      return 'firefox';
    }
    else if (window.chrome !== 'undefined') {
      if (navigator.userAgent.includes('Edg')) {
        return 'edge';
      }
      return 'chrome';
    }
    else if (!/*@cc_on!@*/false && !!window.StyleMedia) {
      return 'edge';
    }
    return -1;
  }
  var langCode = document.documentElement.lang || "en-US";
  
  var browser_urls = {
    "chrome": "https://support.google.com/chrome/answer/95426?hl=" + langCode,
    "edge": "https://support.microsoft.com/"+ langCode +"/help/4028574/microsoft-edge-change-the-default-search-engine",
    "firefox": "https://support.mozilla.org/"+ langCode +"/kb/add-or-remove-search-engine-firefox"
  };
  
  $("#chrome").attr("href", browser_urls.chrome);
  $("#edge").attr("href", browser_urls.edge);
  $("#firefox").attr("href", browser_urls.firefox);

  var browser = getUserBrowser();

  if (browser !== -1) {
    $("#set-default").attr("href", browser_urls[browser]);
  }

  $("#main_results").on("click", ".result.result-images", function (event) {
  $("#main_results").on("click", ".result.result-images", function (event) {
    event.preventDefault();
    event.preventDefault();
    var target = event.target;
    var target = event.target;
+0 −0

File changed.

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

Loading