Skip to content

Instantly share code, notes, and snippets.

@juanbrujo
Created January 16, 2017 15:02
Show Gist options
  • Save juanbrujo/f53fe6c26686bcf754706304234a1a3b to your computer and use it in GitHub Desktop.
Save juanbrujo/f53fe6c26686bcf754706304234a1a3b to your computer and use it in GitHub Desktop.
Youtube Search Bookmarklet
javascript:(function(){
var youtube = 'https://www.youtube.com/results?search_query=';
var query = prompt('video query');
if(query != '') {
document.location.href = youtube + query;
}
})();
// add a bookmark to your Bookmark tabs and copy this code in URL. Name it YT if you want.
!function(){var a="https://www.youtube.com/results?search_query=",b=prompt("video query");""!=b&&(document.location.href=a+b)}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment