Last active
July 7, 2023 11:58
-
-
Save goeko/f296c124c52973f7b71d8d77e5c0592f to your computer and use it in GitHub Desktop.
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 searchParams = new URLSearchParams(window.location.search); | |
var q = searchParams.get('q'); | |
if (q !== null) { | |
var newUrl = 'https://www.google.de/search?q=' + encodeURIComponent(q); | |
window.open(newUrl, '_blank'); | |
} else { | |
alert('No "q" parameter found in the current URL.'); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment