mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
parent
a13d8955bf
commit
e629c9ccc4
3 changed files with 32 additions and 4 deletions
21
docs/go-to-instance.html
Normal file
21
docs/go-to-instance.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<noscript>This requires JavaScript.</noscript>
|
||||
<ul id=links></ul>
|
||||
<script>
|
||||
(async function() {
|
||||
const links = document.getElementById('links');
|
||||
let res = await fetch('https://searx.space/data/instances.json');
|
||||
let instances = await res.json();
|
||||
for (const [url, info] of Object.entries(instances.instances)) {
|
||||
if (info.error)
|
||||
continue;
|
||||
if (url.startsWith('https://')) {
|
||||
const li = document.createElement('li');
|
||||
const a = document.createElement('a');
|
||||
a.href = url + location.hash.substr(2);
|
||||
a.textContent = url + location.hash.substr(2);
|
||||
li.appendChild(a);
|
||||
links.appendChild(li);
|
||||
}
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue