Skip to content

Commit

Permalink
Fix expanded descriptions not working
Browse files Browse the repository at this point in the history
Fix #1400
  • Loading branch information
dodieboy committed Oct 1, 2022
1 parent c52282e commit b427ef8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions youtube-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ ImprovedTube.ytElementsHandler = function (node) {
});
} else if (name === 'TP-YT-PAPER-BUTTON') {
if (document.documentElement.dataset.pageType === 'video' && id === 'more' && node.parentNode.parentNode.id === 'container') {
this.elements.moreButton = node;

this.description();
setTimeout(function () {
ImprovedTube.description(node);
}, 750);
}
}
};
Expand Down Expand Up @@ -1553,12 +1553,9 @@ ImprovedTube.channelVideosCount = function () {
4.2.3.3 DESCRIPTION
------------------------------------------------------------------------------*/

ImprovedTube.description = function () {
ImprovedTube.description = function (el) {
if (this.storage.description === 'expanded') {
var button = this.elements.moreButton;
setTimeout(function () {
button.click();
}, 750);
el.click();
}
};

Expand Down

0 comments on commit b427ef8

Please sign in to comment.