Skip to content

Commit

Permalink
🐛 Fix problem: when logging in to YouTube and the video page with hea…
Browse files Browse the repository at this point in the history
…rt-action-comment

Fixed that button is not rendered under this condition. #31
  • Loading branch information
1natsu172 committed Feb 11, 2018
1 parent e5e7f15 commit 8384575
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ const newYouTube = {

inject(e) {
debugLog('ATTEMPTING TO INJECT...');
console.log(e);

if (!newYouTube._ready(e)) return;

newYouTube._addClass();
Expand All @@ -185,7 +187,7 @@ const newYouTube = {
e.type === 'yt-visibility-refresh' &&
(
e.target.tagName === 'YTD-ITEM-SECTION-RENDERER' || // this mean: rendered childNode of comments'DOM(<ytd-comments>)
e.target.tagName === 'YTD-COMMENT-ACTION-BUTTONS-RENDERER' // this case: video type with heart action to user comments by creator.
e.target.tagName === 'YTD-CREATOR-HEART-RENDERER' // this case: video type with heart action to user comments by creator.
)
);
},
Expand Down

0 comments on commit 8384575

Please sign in to comment.