this string has no description
custom-search-suggestions.ts
1// Firefox Settings -> Search -> Add -> Advanced -> Suggestions URL
2
3Deno.serve((req) => {
4 const q = new URL(req.url).searchParams.get("q") ?? "";
5 console.log({q})
6
7 const response = [];
8
9 if (q.length > 5) {
10 response.push("this search sucks")
11 response.push("suggestions terminated")
12 }
13
14 return new Response(JSON.stringify([
15 q,
16 response
17 ]));
18});