Jump to content

User:PC78/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by PC78 (talk | contribs) at 20:08, 23 March 2009. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
// [[User:Dschwen/highlightredirects.js]] - please include this line 
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Dschwen/highlightredirects.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//Add a 'null edit' tab
if(wgNamespaceNumber != -1 && wgArticleId != 0) { 
    addOnloadHook( function() {
        addPortletLink('p-cactions', 
                       wgScript + '?title=' + encodeURIComponent(wgPageName) + '&action=edit&nulledit=true',
                       'null',
                       'p-null',
                       'Null edit this page');
    }
)}
if( wgAction == 'edit' && inurl('nulledit') == 'true') {
    addOnloadHook( function() {
        document.getElementById('wpSave').click();
    }
)}
 
function inurl(p) {
    var re = RegExp('[&?]' + p + '=([^&]*)');
    var matches;
    if (matches = re.exec(document.location)) {
        try { 
            return decodeURI(matches[1]);
        } catch (e) { }
    }
    return null;
}

/**** MECU's BR fixer ****/

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Mecu/br.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

/* This is to keep track of who is using this extension: [[User:Mecu/br.js]] */

/**** End MECU's BR fixer ****/