Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // var obsTarget = document.getElementById('posts-form');
- var threadID = String(window.location).split(/[\/\.]/).slice(-2)[0]
- var obsTarget = document.getElementById('thread-' + threadID);
- var obsConfig = {childList: true, subtree: true};
- function mutation(mutation){
- for (n=0; n<mutation.length; n++){
- if (mutation[n].addedNodes.length < 1){continue};
- for (m=0; m<mutation[n].addedNodes.length; m++){
- if (mutation[n].addedNodes[m].getElementsByClassName == undefined){continue}
- posts = mutation[n].addedNodes[m].getElementsByClassName('post-message');
- for (k=0; k<posts.length; k++){
- posts[k].innerHTML = posts[k].innerHTML.replace(/a/gi, 'Z');
- }
- }
- }
- }
- obs = new MutationObserver(mutation);
- obs.observe(obsTarget, obsConfig);
Advertisement
Add Comment
Please, Sign In to add comment