mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
Fixing the dislike skipping issue #1902
This commit is contained in:
@ -27,15 +27,15 @@ export default createPlugin<
|
||||
});
|
||||
},
|
||||
start() {
|
||||
this.waitForElem('#like-button-renderer').then((likeBtn) => {
|
||||
this.waitForElem('#dislike-button-renderer').then((dislikeBtn) => {
|
||||
this.observer = new MutationObserver(() => {
|
||||
if (likeBtn?.getAttribute('like-status') == 'DISLIKE') {
|
||||
if (dislikeBtn?.getAttribute('like-status') == 'DISLIKE') {
|
||||
document
|
||||
.querySelector<HTMLButtonElement>('tp-yt-paper-icon-button.next-button')
|
||||
?.click();
|
||||
}
|
||||
});
|
||||
this.observer.observe(likeBtn, {
|
||||
this.observer.observe(dislikeBtn, {
|
||||
attributes: true,
|
||||
childList: false,
|
||||
subtree: false,
|
||||
|
||||
Reference in New Issue
Block a user