Last active
January 24, 2018 11:03
-
-
Save buzamahmooza/518352f867c34074a61527f99a3147a9 to your computer and use it in GitHub Desktop.
Redirects you to Google images and searches for pictures of the text selection or the site URL. (If any text is selected )
This file contains 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
q=(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text); | |
location.href="https://www.google.com/search?&tbm=isch&q="+((typeof q!=='string'||q.length<1?("site:"+location.hostname):(''+q)).replace(/\s+/g,"+")); | |
console.log('q=', q); | |
void(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment