From 0974dd4eafa832e51efe516d3182a17a90ce29d1 Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Thu, 23 Feb 2023 10:05:23 +0100 Subject: [PATCH] expand description. new css --- content-scripts/website-context/functions.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/content-scripts/website-context/functions.js b/content-scripts/website-context/functions.js index fc3a60a95..828057a73 100644 --- a/content-scripts/website-context/functions.js +++ b/content-scripts/website-context/functions.js @@ -196,10 +196,17 @@ ImprovedTube.ytElementsHandler = function (node) { node.calculateNormalPlayerSize_ = node.calculateCurrentPlayerSize_; } + }else if (id ==='description-inner') { + if (document.documentElement.dataset.pageType === 'video'){ + setTimeout(function () { + ImprovedTube.description(node); + }, 750); + } + //old }else if (name === 'TP-YT-PAPER-BUTTON') { if (document.documentElement.dataset.pageType === 'video' && id === 'more' && node.parentNode.parentNode.id === 'container') { setTimeout(function () { - ImprovedTube.description(node); + ImprovedTube.description(node); }, 750); } } @@ -212,7 +219,7 @@ ImprovedTube.pageType = function () { document.documentElement.dataset.pageType = 'subscriptions'; } else if (/\/watch\?/.test(location.href)) { document.documentElement.dataset.pageType = 'video'; - } else if (/\/channel|\/user|\/c\/|\/@.*\//.test(location.href)) { + } else if (/\/channel|\/user|\/c\/|\/@/.test(location.href)) { document.documentElement.dataset.pageType = 'channel'; } else { document.documentElement.dataset.pageType = 'other'; @@ -534,4 +541,4 @@ ImprovedTube.showStatus = function (value) { }, 500); this.elements.player.appendChild(this.elements.status); -}; \ No newline at end of file +};