Last active
August 22, 2018 08:54
-
-
Save akaleeroy/11367202 to your computer and use it in GitHub Desktop.
YouTube Thumbnail Image Search Bookmarklet
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
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