Skip to content

Instantly share code, notes, and snippets.

@akaleeroy
Last active August 22, 2018 08:54
Show Gist options
  • Save akaleeroy/11367202 to your computer and use it in GitHub Desktop.
Save akaleeroy/11367202 to your computer and use it in GitHub Desktop.
YouTube Thumbnail Image Search Bookmarklet
javascript: (function() {
// var thumb = document.querySelector("meta[property='og:image']").content;
// var t = document.querySelector("link[itemprop='thumbnailUrl']").href;
const thumbnailUrl = `https://i.ytimg.com/vi/${ytplayer.config.args.video_id}/hqdefault.jpg`;
const imageSearchUrl = 'https://images.google.com/searchbyimage?site=search&image_url=' + thumbnailUrl;
const thumbnailWindow = window.open(thumbnailUrl, 'thumbnailWindow');
const imageSearchWindow = window.open(imageSearchUrl, 'imageSearchWindow');
setTimeout(function() {
newWindow.focus();
}, 250);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment