Created
March 22, 2019 22:16
-
-
Save WJWang/29ad8a52367ae850c09067758d9be00a to your computer and use it in GitHub Desktop.
KK Webplayer Blocker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let ARTIST_ID_BLACKLIST = []; | |
setInterval(() => { | |
if (!!~ARTIST_ID_BLACKLIST.indexOf(JSON.parse(localStorage.getItem('ngStorage-playing')).current.song.artist_id)) { | |
[] | |
.filter | |
.call(document.querySelector('#player > div.controls').children, child => child.getAttribute('title') === '下一首') | |
.forEach((el) => { | |
if (el.fireEvent) { | |
el.fireEvent('onclick'); | |
} else { | |
el.dispatchEvent(new Event('click')); | |
} | |
}); | |
} | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment