User:Ditto Duck Penguin/chat.js

// importScriptPage('User:Ditto_Creeper_Bot/chat.js', 'steven-universe');

// Mutation Observer Experiment // Today I learned about ^ // $(function { //    setTimeout(function { //        var target = $(".Chat ul")[0]; //        // create an observer instance //        var observer = new MutationObserver(function(mutations, observer) { //             d = mutations[0].addedNodes[0].innerHTML; //             console.log(d); //             if (mutations[0].addedNodes[0].innerHTML.match(/"> <\/a>/gmi)) { //                 console.log("Found"); //                 mutations[0].addedNodes[0].innerHTML = mutations[0].addedNodes[0].innerHTML.replace(/href="([\w\d\S]*)"> <\/a>{1,}?/gmi, 'href="$1" style="color:red">' + decodeURIComponent('$1') + '<\/a>'); //             } //             ; //         } //         ); //         observer.observe(target, { //             attributes: true, //             childList: true, //             subtree: true //         }); //     }, 3000) // });