|
16 | 16 | import { detectAll } from '/assets/js/vendor/tinyld.min.js'; |
17 | 17 |
|
18 | 18 | const MIN_MONTH_UPTIME = 95; |
19 | | -const FALLBACKS = ['searx.bndkt.io', 'paulgo.io', 'search.im-in.space', 'search.ononoki.org', 'search.undertale.uk', 'searx.oloke.xyz']; |
| 19 | +const FALLBACKS = ['paulgo.io', 'search.im-in.space', 'search.ononoki.org', 'search.undertale.uk', 'searx.bndkt.io', 'searx.oloke.xyz']; |
20 | 20 |
|
21 | 21 | const params = new URLSearchParams(window.location.search); |
22 | 22 |
|
23 | 23 | const loadInstances = async () => { |
24 | | - const fallbacks = FALLBACKS.map(i => `https://${i}/`); // TODO: load from cache |
| 24 | + const fallbacks = FALLBACKS.map(i => `https://${i}/`); |
25 | 25 | if (params.get('fast') === 1) return fallbacks; |
26 | 26 |
|
27 | 27 | const response = await fetch('https://searx.space/data/instances.json'); |
|
86 | 86 | if (query) { |
87 | 87 | redirect(targetUrl, query); |
88 | 88 | } else { |
89 | | - document.body.innerHTML = '<p>Accepts SearXNG <a target="_blank" href="https://docs.searxng.org/dev/search_api.html">GET parameters</a> + special optional parameter <code>fast=1</code> for hardcoded instances.</p><p>Example for <a href="chrome://settings/search" target="_blank">browser settings</a>: <code>{{ site.url }}{{ page.url }}?q=%s&fast=1&image_proxy=True&categories=images</code></p>'; |
| 89 | + document.body.innerHTML = '<p>This page accepts SearXNG <a target="_blank" href="https://docs.searxng.org/dev/search_api.html">GET parameters</a> + special optional parameter <code>fast=1</code> for hardcoded instances.</p><p>Example for browser settings (<code>chrome://settings/search</code> or <code>about:preferences#search</code>):</p><p><code>{{ site.url }}{{ page.url }}?q=%s&fast=1&image_proxy=True&categories=images</code></p>'; |
90 | 90 |
|
91 | 91 | const input = document.createElement('input'); |
92 | | - const form = document.createElement('form'); |
| 92 | + input.placeholder = 'Search for...'; |
| 93 | + input.autocomplete = 'off'; |
| 94 | + input.autocapitalize = 'none'; |
| 95 | + input.spellcheck = false; |
| 96 | + input.autocorrect = 'off'; |
| 97 | + input.dir = 'auto'; |
| 98 | + input.style.width = '90%'; |
93 | 99 |
|
| 100 | + const form = document.createElement('form'); |
94 | 101 | form.addEventListener('submit', event => { |
95 | 102 | event.preventDefault(); |
96 | 103 | redirect(targetUrl, input.value); |
|
0 commit comments