Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name MP4 killer
- // @namespace 2ch
- // @version 0.0.1
- // @description Remove all MP4
- // @author AHOHNMYC
- // @match https://2ch.hk/*
- // @grant none
- // ==/UserScript==
- function killMP4(){
- let iterator = document.evaluate('//a[contains(@href,"mp4")]/../../..', document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null),
- t, a = [];
- while (( t = iterator.iterateNext() )) a.push(t);
- a.forEach( el=>el.remove() );
- }
- new MutationObserver(killMP4).observe(document.getElementById('ABU-alertbox'), {childList: true});
- killMP4();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement