Skip to content

Instantly share code, notes, and snippets.

@WJWang
Created March 22, 2019 22:16
Show Gist options
  • Save WJWang/29ad8a52367ae850c09067758d9be00a to your computer and use it in GitHub Desktop.
Save WJWang/29ad8a52367ae850c09067758d9be00a to your computer and use it in GitHub Desktop.
KK Webplayer Blocker
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