Skip to content

Instantly share code, notes, and snippets.

@luckycdev
Last active April 27, 2022 18:31
Show Gist options
  • Save luckycdev/18657aa8537f011f7291bdd29b5be469 to your computer and use it in GitHub Desktop.
Save luckycdev/18657aa8537f011f7291bdd29b5be469 to your computer and use it in GitHub Desktop.
search using searx with a bookmarklet - easily changeable - searx search bookmarklet

Search searx with a bookmarklet, easily changeable link, change where it says var a="https://searx.puffyan.us/search?q=";

you might have to adjust the url to what the url is when searching if using a different link


Code:

javascript:
var a="https://searx.puffyan.us/search?q=";
var b=prompt("What would you like to search on searx?", "Search");
if(b==="")
{
alert("invalid response");
}
else if(b===" ")
{
alert("invalid response")
}
else if(b!=null)
{
open(a+encodeURI(b));
}

Bookmarklet:

javascript:var a="https://searx.puffyan.us/search?q="; var b=prompt("What would you like to search on searx?", "Search"); if(b===""){alert("invalid response");}else if(b===" "){alert("invalid response")}else if(b!=null) {open(a+encodeURI(b));}
javascript:var a="https://searx.puffyan.us/search?q="; var b=prompt("What would you like to search on searx?", "Search"); if(b===""){alert("invalid response");}else if(b===" "){alert("invalid response")}else if(b!=null) {open(a+encodeURI(b));}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment