diff --git a/src/scripts/betterYoutube.js b/src/scripts/betterYoutube.js index 039d7ad..cb44c6d 100644 --- a/src/scripts/betterYoutube.js +++ b/src/scripts/betterYoutube.js @@ -26,8 +26,6 @@ function preSetupProc() { mainContentArea = document.getElementsByTagName("ytd-watch")[0]; // BT control insert area and bg color setup containerOfPlyrWndow = document.getElementById("top").children[0]; // Container of actual player - Used for floating window - vdoPlyrAtts = document.getElementsByTagName("ytd-watch")[0] - .getAttribute("video-id"); // Used for setting up thumbnails video = document.getElementsByTagName("video")[0]; // Video Controler part = "https://img.youtube.com/vi/"; @@ -78,8 +76,10 @@ function preSetupProc() { // Functions function showThumbImageVew(e) { - videoSlug = vdoPlyrAtts; + vdoPlyrAtts = video.baseURI; // Used for setting up thumbnails + vdoPlyrAtts = vdoPlyrAtts.slice(32, 32+11); + videoSlug = vdoPlyrAtts; if (ytThumbImgMenu.style.display == "block") { ytThumbImgMenu.style.display = "none"; ytThumbnailBttn.src = browser.extension.getURL("icons/thumbnailOff.png");