Loading manage +10 −0 Original line number Original line Diff line number Diff line Loading @@ -288,6 +288,16 @@ 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/" 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 Loading searx/static/themes/etheme/js/etheme.js +31 −0 Original line number Original line Diff line number Diff line Loading @@ -85,6 +85,37 @@ $(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 (!isIE && !!window.StyleMedia) { return 'edge'; } else if(!!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime)) { return 'chrome'; } return -1; } var browser_urls = { "chrome": "https://support.google.com/chrome/answer/95426", "edge": "https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine", "firefox": "https://support.mozilla.org/en-US/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; Loading searx/static/themes/etheme/js/etheme.min.js +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file searx/templates/etheme/about.html +5 −9 Original line number Original line Diff line number Diff line Loading @@ -63,7 +63,7 @@ the default search engine.""") }} the default search engine.""") }} </p> </p> <h2 id='add to browser'>{{ _('How to set as the default search engine?') }}</h2> <h2 id='add-to-browser'>{{ _('How to set as the default search engine?') }}</h2> <p> <p> {{ _('Spot supports') }} <a {{ _('Spot supports') }} <a Loading @@ -72,12 +72,9 @@ </p> </p> <ul> <ul> <li><a href="https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox">Firefox</a></li> <li><a id="firefox">Firefox</a></li> <li><a <li><a id="edge">Microsoft Edge</a></li> href="https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine">Microsoft <li><a id="chrome">Chromium-based browsers</a></li> Edge</a></li> <li>Chromium-based browsers <a href="https://www.chromium.org/tab-to-search">{{ _('only add websites that the user navigates to without a path.') }}</a> </ul> </ul> Loading @@ -85,8 +82,7 @@ <p> <p> {{ _('Spot appreciates your concern regarding logs, so take the code from the') }} <a {{ _('Spot appreciates your concern regarding logs, so take the code from the') }} <a href="https://gitlab.e.foundation/e/infra/spot">{{ _('original Spot project') }}</a> {{ _('and run it href="https://gitlab.e.foundation/e/infra/spot">{{ _('original Spot project') }}</a> {{ _('and run it yourself!') }} yourself!') }} </p> </p> </div> </div> Loading searx/templates/etheme/base.html +2 −1 Original line number Original line Diff line number Diff line Loading @@ -90,12 +90,13 @@ <p class="text-muted"> <p class="text-muted"> <small> <small> <span class="links"> <span class="links"> <a id="set-default" href="{{url_for('about', _anchor='add-to-browser')}}">{{ _('Set as default') }}</a> <a href="{{url_for('about')}}">{{ _('About') }}</a> <a href="{{url_for('about')}}">{{ _('About') }}</a> <a href="https://e.foundation/legal-notice-privacy">{{ _('Privacy') }}</a> <a href="https://e.foundation/legal-notice-privacy">{{ _('Privacy') }}</a> </span></br> </span></br> e Foundation 2018-{{ year }}, e Foundation 2018-{{ year }}, {{ _('Powered by') }} <a href="{{ repo_url }}">Spot</a> {{ version }}<br/> {{ _('Powered by') }} <a href="{{ repo_url }}">Spot</a> {{ version }}<br/> An open-source metasearch engine forked from <a href="https://docs.searxng.org/">Searxng</a> {{ _('An open-source metasearch engine forked from') }}<a href="https://docs.searxng.org/"> Searxng</a> </small> </small> </p> </p> </footer> </footer> Loading Loading
manage +10 −0 Original line number Original line Diff line number Diff line Loading @@ -288,6 +288,16 @@ 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/" 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 Loading
searx/static/themes/etheme/js/etheme.js +31 −0 Original line number Original line Diff line number Diff line Loading @@ -85,6 +85,37 @@ $(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 (!isIE && !!window.StyleMedia) { return 'edge'; } else if(!!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime)) { return 'chrome'; } return -1; } var browser_urls = { "chrome": "https://support.google.com/chrome/answer/95426", "edge": "https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine", "firefox": "https://support.mozilla.org/en-US/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; Loading
searx/static/themes/etheme/js/etheme.min.js +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file
searx/templates/etheme/about.html +5 −9 Original line number Original line Diff line number Diff line Loading @@ -63,7 +63,7 @@ the default search engine.""") }} the default search engine.""") }} </p> </p> <h2 id='add to browser'>{{ _('How to set as the default search engine?') }}</h2> <h2 id='add-to-browser'>{{ _('How to set as the default search engine?') }}</h2> <p> <p> {{ _('Spot supports') }} <a {{ _('Spot supports') }} <a Loading @@ -72,12 +72,9 @@ </p> </p> <ul> <ul> <li><a href="https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox">Firefox</a></li> <li><a id="firefox">Firefox</a></li> <li><a <li><a id="edge">Microsoft Edge</a></li> href="https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine">Microsoft <li><a id="chrome">Chromium-based browsers</a></li> Edge</a></li> <li>Chromium-based browsers <a href="https://www.chromium.org/tab-to-search">{{ _('only add websites that the user navigates to without a path.') }}</a> </ul> </ul> Loading @@ -85,8 +82,7 @@ <p> <p> {{ _('Spot appreciates your concern regarding logs, so take the code from the') }} <a {{ _('Spot appreciates your concern regarding logs, so take the code from the') }} <a href="https://gitlab.e.foundation/e/infra/spot">{{ _('original Spot project') }}</a> {{ _('and run it href="https://gitlab.e.foundation/e/infra/spot">{{ _('original Spot project') }}</a> {{ _('and run it yourself!') }} yourself!') }} </p> </p> </div> </div> Loading
searx/templates/etheme/base.html +2 −1 Original line number Original line Diff line number Diff line Loading @@ -90,12 +90,13 @@ <p class="text-muted"> <p class="text-muted"> <small> <small> <span class="links"> <span class="links"> <a id="set-default" href="{{url_for('about', _anchor='add-to-browser')}}">{{ _('Set as default') }}</a> <a href="{{url_for('about')}}">{{ _('About') }}</a> <a href="{{url_for('about')}}">{{ _('About') }}</a> <a href="https://e.foundation/legal-notice-privacy">{{ _('Privacy') }}</a> <a href="https://e.foundation/legal-notice-privacy">{{ _('Privacy') }}</a> </span></br> </span></br> e Foundation 2018-{{ year }}, e Foundation 2018-{{ year }}, {{ _('Powered by') }} <a href="{{ repo_url }}">Spot</a> {{ version }}<br/> {{ _('Powered by') }} <a href="{{ repo_url }}">Spot</a> {{ version }}<br/> An open-source metasearch engine forked from <a href="https://docs.searxng.org/">Searxng</a> {{ _('An open-source metasearch engine forked from') }}<a href="https://docs.searxng.org/"> Searxng</a> </small> </small> </p> </p> </footer> </footer> Loading