Skip to content

Commit

Permalink
expand description. new css
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube authored Feb 23, 2023
1 parent f73e418 commit 0974dd4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions content-scripts/website-context/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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';
Expand Down Expand Up @@ -534,4 +541,4 @@ ImprovedTube.showStatus = function (value) {
}, 500);

this.elements.player.appendChild(this.elements.status);
};
};

0 comments on commit 0974dd4

Please sign in to comment.