User:Dessamator/luanewpp

// ==UserScript== // @name          Display NewPP report // @description   Display the NewPP limits report on-screen // @include       http://*.wikia.com/* // @grant         none // @author        https://en.wikipedia.org/wiki/User:Anomie //https://en.wikipedia.org/wiki/User:Anomie/PP-report-Greasemonkey-script // Custom hide by Dessamator // ==/UserScript== (function{   var tw=document.createTreeWalker(document.getElementById('mw-content-text'), 128, null, false);    while(tw.nextNode){        var m=tw.currentNode.nodeValue.match(/NewPP limit report\n([\s\S]*)/);        if(m){            var d=document.createElement('DIV');            d.style.position='absolute';            d.style.top="50px";            d.style.left=0;            d.style.fontSize='9pt';            d.style.color='blue';            d.style.background='#FDF6E3';            d.style.border='1px solid black';            d.style.zIndex=10000;            d.style.whiteSpace='pre';            d.textContent = "NewPP report (Show/Hide)";            d.className ="classNewPP";            var d2=document.createElement('DIV');            d2.className = "hiddenNewPP";            d2.textContent = m[1];            d2.style.color='black';            d2.style.display="none";            d.appendChild(d2); document.body.appendChild(d); }   }    $('.classNewPP').click(function{        $('.hiddenNewPP').slideToggle('slow');    }); });