User:Lexi Marie/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* <pre><nowiki> */
if (wgPageName == 'Special:Contributions' && (((lim = document.location.href.match(/[&?]limit=([^&]*)/)) && parseInt(lim[1]) < 250) || !lim)) {
    addOnloadHook(function() {
        var contribs = document.getElementById('bodyContent').getElementsByTagName('li');
        var mainNode;
        var aNode;
        var links;
        for (var i = 0, leng = contribs.length; i < leng; i++) {
            links = contribs[i].getElementsByTagName('a');
            mainNode = document.createElement('span');
               mainNode.appendChild(document.createTextNode('('));
            aNode = document.createElement('a');
            aNode.href = links[1].href.replace('prev', 'cur');
            aNode.appendChild(document.createTextNode('cur'));
            mainNode.appendChild(aNode);
            mainNode.appendChild(document.createTextNode(') '));
            contribs[i].insertBefore(mainNode, links[2]);
        }
    });
}



/* </nowiki></pre> */