Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function(){
var idToSearch=window.getSelection ?
window.getSelection().toString() :
document.selection.createRange().text;
if (idToSearch=== "") {
t = prompt("Enter ID","");
}
if (idToSearch) {
window.location='https://someurl.com/page.html?id='+idToSearch;
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.