Skip to content

Commit

Permalink
perfectionism
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Aug 16, 2023
1 parent 7946d1d commit 55735ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 8 additions & 1 deletion js&css/web-accessible/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,14 @@ document.addEventListener('it-message-from-extension', function () {
document.querySelector("#secondary").appendChild(document.querySelector("#related")); }
else{ImprovedTube.commentsSidebar();}
}

else if (camelized_key === 'forcedTheaterMode') { if(ImprovedTube.storage.forced_theater_mode === false && ImprovedTube.elements.ytd_watch && ImprovedTube.elements.player){
var button = ImprovedTube.elements.player.querySelector("button.ytp-size-button");
if (button && ImprovedTube.elements.ytd_watch.theater === true) {
ImprovedTube.elements.ytd_watch.theater = false;
setTimeout(function () { button.click();}, 100);
}
}
}
if (ImprovedTube[camelized_key]) {
try{ImprovedTube[camelized_key]()}catch{};
}
Expand Down
10 changes: 0 additions & 10 deletions js&css/web-accessible/www.youtube.com/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ ImprovedTube.forcedTheaterMode = function () {
}, 100);
}
}
else if(ImprovedTube.storage.forced_theater_mode === false && ImprovedTube.elements.ytd_watch && ImprovedTube.elements.player){
var button = ImprovedTube.elements.player.querySelector("button.ytp-size-button");
if (button && ImprovedTube.elements.ytd_watch.theater === true) {
ImprovedTube.elements.ytd_watch.theater = false;
setTimeout(function () {
button.click();
}, 100);
}
}

};
/*------------------------------------------------------------------------------
HD THUMBNAIL
Expand Down

0 comments on commit 55735ca

Please sign in to comment.