Skip to content

Commit fa712c9

Browse files
committed
Debug
1 parent 3c13104 commit fa712c9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tools/searxng.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
permalink: /tools/searxng
2+
permalink: /searxng
33
---
44

55
<!DOCTYPE html>
66
<html>
77
<head>
88
<meta charset="utf-8">
9-
<link rel="search" type="application/opensearchdescription+xml" title="SearXNG" href="{{ site.url }}/tools/searxng.xml">
9+
<link rel="search" type="application/opensearchdescription+xml" title="SearXNG" href="{{ site.url }}/searxng.xml">
1010
<title>SearXNG Redirector</title>
1111
</head>
1212
<body>
@@ -70,6 +70,7 @@
7070
.entries()
7171
.filter(([k, _]) => k !== 'fast')
7272
.forEach(([k, v]) => url.searchParams.set(k, v));
73+
url.searchParams.set('q', query)
7374
console.log(url);
7475
window.location.replace(url.toString());
7576
};
@@ -83,8 +84,8 @@
8384
if (query) {
8485
redirect(targetUrl, query);
8586
} else {
86-
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> to use hardcoded instances.</p>';
87-
//window.external.AddSearchProvider('searxng.xml'); // FIXME
87+
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. Example: <code>{{ site.url }}/{{ page.url }}?q=%s&fast=1&image_proxy=True&categories=images</code></p>';
88+
window.external.AddSearchProvider('searxng.xml'); // FIXME
8889

8990
const input = document.createElement('input');
9091
const form = document.createElement('form');

0 commit comments

Comments
 (0)