File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 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
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' ;
You can’t perform that action at this time.
0 commit comments