From b24ede7824a3b23e50f6c928d3a2dff61cf7b83f Mon Sep 17 00:00:00 2001 From: Rasz_pl Date: Mon, 1 Jul 2024 18:16:43 +0200 Subject: [PATCH] Update appearance.js ImprovedTube.descriptionSidebar undefined ImprovedTube.descriptionSidebar was undefined without undoTheNewSidebar, this is why proper code indentation is so important, just clicking auto align in IDE would reveal this bug --- .../www.youtube.com/appearance.js | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/js&css/web-accessible/www.youtube.com/appearance.js b/js&css/web-accessible/www.youtube.com/appearance.js index 1dcf92ca2..5fde0b5b7 100644 --- a/js&css/web-accessible/www.youtube.com/appearance.js +++ b/js&css/web-accessible/www.youtube.com/appearance.js @@ -2,23 +2,23 @@ APPEARANCE ------------------------------------------------------------------------------*/ 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; - yt.config_.EXPERIMENT_FLAGS.web_watch_rounded_player_large = false; - } catch (error) { console.error("can't undo description on the side", error); - } -} -ImprovedTube.descriptionSidebar = function () { try { - yt.config_.EXPERIMENT_FLAGS.kevlar_watch_grid = true; - yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments = true; - yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments_ep = true; - } catch (error) { console.error("tried to move description to the sidebar", error); - } -} -} + 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; + yt.config_.EXPERIMENT_FLAGS.web_watch_rounded_player_large = false; + } catch (error) { console.error("can't undo description on the side", error); } + } +}; + +ImprovedTube.descriptionSidebar = function () { + try { + yt.config_.EXPERIMENT_FLAGS.kevlar_watch_grid = true; + yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments = true; + yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments_ep = true; + } catch (error) { console.error("tried to move description to the sidebar", error); } +}; /*------------------------------------------------------------------------------ PLAYER ------------------------------------------------------------------------------*/