Skip to content

Instantly share code, notes, and snippets.

@ttonyh
Last active February 15, 2020 19:16
Show Gist options
  • Save ttonyh/ba040238da8d3d0ffe07127d03b50d48 to your computer and use it in GitHub Desktop.
Save ttonyh/ba040238da8d3d0ffe07127d03b50d48 to your computer and use it in GitHub Desktop.
Bookmarklet - Used while in Google Images, to transfer the current search to Bing Images (which currently has a better interface)
(function( p, u, q ) {
p = document.location.search.substr( 1 ).split( '&' );
u = 'https://www.bing.com/images/search?q=';
if ( p ) {
q = p.filter( a => String( a ).startsWith( 'q=' ) );
if ( q && q.length ) {
q = q[ 0 ].replace( 'q=', '' );
window.document.location = u + q;
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment