Skip to content

Instantly share code, notes, and snippets.

@crakaC
Last active May 13, 2017 05:23
Show Gist options
  • Save crakaC/052afd00dfb19046158772b1ca18e4b2 to your computer and use it in GitHub Desktop.
Save crakaC/052afd00dfb19046158772b1ca18e4b2 to your computer and use it in GitHub Desktop.
全自動ニコりスクリプト
var observer = new MutationObserver((mutations) => {
mutations.forEach((m) => {
m.addedNodes.forEach((node) => {
if(node.className != "status") return;
var nicoruButton = node.querySelector("[aria-label='ニコる']");
if(nicoruButton.children[0].className.includes("inactive")){
// nicoruButton.click();
}
});
})
});
var target = document.querySelectorAll(".status-list")[1];
observer.observe(target, {childList: true});
setTimeout(()=>observer.disconnect(), 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment