Skip to content

Commit ac14c60

Browse files
committed
Update
1 parent 887b87b commit ac14c60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redirect-searxng-on-failure.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @name Redirect SearXNG On Failure
33
// @description Redirect to a random SearXNG instance in case of error and empty result
44
// @icon https://www.google.com/s2/favicons?sz=64&domain=searx.space
5-
// @version 0.1
5+
// @version 0.2
66
// @downloadURL https://userscripts.codonaft.com/redirect-searxng-on-failure.js
77
// ==/UserScript==
88

@@ -18,9 +18,9 @@
1818

1919
console.log('SearXNG: no results');
2020
const url = new URL(window.location.href);
21-
if (url.host.endsWith('.onion')) {
21+
if (url.hostname.endsWith('.onion')) {
2222
url.host = 'codonaftbvv4j5k7nsrdivbdblycqrng5ls2qkng6lm77svepqjyxgid.onion';
23-
} else if (url.host.endsWith('.i2p')) {
23+
} else if (url.hostname.endsWith('.i2p')) {
2424
url.host = 'codonftbnpdkjwyflssto3iklawhuthbe37l6swigegqkyyfmiqa.b32.i2p';
2525
} else {
2626
url.host = 'codonaft.com';

0 commit comments

Comments
 (0)