diff --git a/README.md b/README.md index 128cd11..1066a79 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ Better YouTube + works to improve the YouTube experience by providing quick acce * It allows for quick access to the YouTube video slug. * It lets Unix, Linux, and MacOS systems the ability to download the video using native app calls. -# Version: 1.3.6 -* Added download feature for Unix, Linux, and MacOS systems using native messaging. +# Version: 1.3.7 +* Controls hide with video full screen. # Download https://addons.mozilla.org/en-US/firefox/addon/better-youtube-plus/ diff --git a/src/manifest.json b/src/manifest.json index 2e0b308..587818d 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Better Youtube +", - "version": "1.3.6", + "version": "1.3.7", "description": "Enhancements for Youtube to have a better experience.", "applications": { diff --git a/src/scripts/betterYoutube.js b/src/scripts/betterYoutube.js index 913ce70..9da6243 100644 --- a/src/scripts/betterYoutube.js +++ b/src/scripts/betterYoutube.js @@ -1,5 +1,4 @@ (function() { - // Declare variables let slugInputTag, ytThumbImgMenu, ytEnhancerMenu; // Menu systems let ytThumbnailBttn, ytMaxDefaultImg, ytHqDefaultImg, // Buttons & Images @@ -118,6 +117,7 @@ ytFloatBttn.addEventListener("click", toggleFloat); ytDownloadBttn.addEventListener("click", downloadVideo); video.addEventListener("wheel", manageVolume); + video.addEventListener("dblclick", controlManager); // Dragable window for floating video dragVideo(poppedContainer); @@ -149,6 +149,8 @@ ytRangeStart.id = "rangeStartID"; ytRangeEnd.id = "rangeEndID"; poppedContainer.style.display = "none"; + ytEnhancerMenu.style.display = "block"; + slugInputTag.style.display = "block"; ytIfrm.setAttribute("allow", "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"); ytIfrm.setAttribute("frameborder", "0"); @@ -159,6 +161,16 @@ } // Functions + const controlManager = () => { + if (ytEnhancerMenu.style.display == "block") { + ytEnhancerMenu.style.display = "none"; + slugInputTag.style.display = "none"; + } else { + ytEnhancerMenu.style.display = "block"; + slugInputTag.style.display = "block"; + } + } + const downloadVideo = () => { browser.runtime.sendMessage( { "url": video.baseURI } ); }