Last active
March 27, 2018 20:31
-
-
Save gofydo/3a170dd3b3b9fa74b6c60234f5ae59c4 to your computer and use it in GitHub Desktop.
A JS bookmark that prompts for a piece of swappable URL params, and navigates to it in a new tab.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var url = "https://www.google.com/search?safe=active&biw=1302&bih=916&tbm=isch&source=lnt&tbs=isz:ex,iszw:128,iszh:128&q={q}"; | |
var prompt = 'Name the icon:'; | |
var input_text = ''; | |
function isValid() { | |
return q.length > 0; | |
} | |
function getQuery() { | |
return window.prompt(prompt, input_text); | |
}; | |
var q = getQuery(); | |
if (q == null){ | |
return; | |
} | |
while (!isValid(q)){ | |
var q = getQuery(); | |
} | |
window.open(url.replace('{q}', q)).focus(); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SCOUT-APP Jenkins Build Params