User:Live Delta/chat.js

var userToLog = ""; var userToLoghref = ""; // select the target node var target = document.querySelector('#UserStatsMenu'); // create an observer instance var observer = new MutationObserver(function(mutations) {  mutations.forEach(function(mutation) { userToLog = $('#UserStatsMenu .username').text; userToLoghref = userToLog.split(' ').join('+'); $('#UserStatsMenu .username').replaceWith('' + userToLog + ''); });    });