diff --git a/js&css/web-accessible/www.youtube.com/appearance.js b/js&css/web-accessible/www.youtube.com/appearance.js index 0d1b8d589..1dcf92ca2 100644 --- a/js&css/web-accessible/www.youtube.com/appearance.js +++ b/js&css/web-accessible/www.youtube.com/appearance.js @@ -1,7 +1,9 @@ /*------------------------------------------------------------------------------ APPEARANCE ------------------------------------------------------------------------------*/ -ImprovedTube.undoTheNewSidebar = function () { try { +ImprovedTube.undoTheNewSidebar = function () { +if (document.documentElement.dataset.pageType === 'video' && yt) { +try { yt.config_.EXPERIMENT_FLAGS.kevlar_watch_grid = false; yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments = false; yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments_ep = false; @@ -16,6 +18,7 @@ ImprovedTube.descriptionSidebar = function () { try { } catch (error) { console.error("tried to move description to the sidebar", error); } } +} /*------------------------------------------------------------------------------ PLAYER ------------------------------------------------------------------------------*/ @@ -34,7 +37,7 @@ ImprovedTube.playerSize = function () { style.textContent += "}"; document.body.appendChild(style); - window.dispatchEvent(new Event('resize')); + if (document.documentElement.dataset.pageType === 'video') { window.dispatchEvent(new Event('resize')); } } }; /*------------------------------------------------------------------------------