Controls hide with video full screen.
This commit is contained in:
parent
a638cefe21
commit
0428abcc6b
|
@ -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 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.
|
* It lets Unix, Linux, and MacOS systems the ability to download the video using native app calls.
|
||||||
|
|
||||||
# Version: 1.3.6
|
# Version: 1.3.7
|
||||||
* Added download feature for Unix, Linux, and MacOS systems using native messaging.
|
* Controls hide with video full screen.
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
https://addons.mozilla.org/en-US/firefox/addon/better-youtube-plus/
|
https://addons.mozilla.org/en-US/firefox/addon/better-youtube-plus/
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Better Youtube +",
|
"name": "Better Youtube +",
|
||||||
"version": "1.3.6",
|
"version": "1.3.7",
|
||||||
"description": "Enhancements for Youtube to have a better experience.",
|
"description": "Enhancements for Youtube to have a better experience.",
|
||||||
|
|
||||||
"applications": {
|
"applications": {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
// Declare variables
|
// Declare variables
|
||||||
let slugInputTag, ytThumbImgMenu, ytEnhancerMenu; // Menu systems
|
let slugInputTag, ytThumbImgMenu, ytEnhancerMenu; // Menu systems
|
||||||
let ytThumbnailBttn, ytMaxDefaultImg, ytHqDefaultImg, // Buttons & Images
|
let ytThumbnailBttn, ytMaxDefaultImg, ytHqDefaultImg, // Buttons & Images
|
||||||
|
@ -118,6 +117,7 @@
|
||||||
ytFloatBttn.addEventListener("click", toggleFloat);
|
ytFloatBttn.addEventListener("click", toggleFloat);
|
||||||
ytDownloadBttn.addEventListener("click", downloadVideo);
|
ytDownloadBttn.addEventListener("click", downloadVideo);
|
||||||
video.addEventListener("wheel", manageVolume);
|
video.addEventListener("wheel", manageVolume);
|
||||||
|
video.addEventListener("dblclick", controlManager);
|
||||||
|
|
||||||
// Dragable window for floating video
|
// Dragable window for floating video
|
||||||
dragVideo(poppedContainer);
|
dragVideo(poppedContainer);
|
||||||
|
@ -149,6 +149,8 @@
|
||||||
ytRangeStart.id = "rangeStartID";
|
ytRangeStart.id = "rangeStartID";
|
||||||
ytRangeEnd.id = "rangeEndID";
|
ytRangeEnd.id = "rangeEndID";
|
||||||
poppedContainer.style.display = "none";
|
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("allow", "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture");
|
||||||
ytIfrm.setAttribute("frameborder", "0");
|
ytIfrm.setAttribute("frameborder", "0");
|
||||||
|
@ -159,6 +161,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Functions
|
// 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 = () => {
|
const downloadVideo = () => {
|
||||||
browser.runtime.sendMessage( { "url": video.baseURI } );
|
browser.runtime.sendMessage( { "url": video.baseURI } );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue