MediaWiki:Gadget-addsection-plus.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button. Firefox: hold down the Shift key while clicking Reload (or press Ctrl-Shift-R). Google Chrome and Safari users can just click the Reload button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.

// **********************************************************************
// **                 ***WARNING GLOBAL GADGET FILE***                 **
// **             changes to this file affect many users.              **
// **           please discuss on the talk page before editing         **
// **                                                                  **
// **********************************************************************
$(document).ready( function () {
    var tab, tablink;

    tab = document.getElementById('ca-addsection');
    if ( !tab ) {
        return;
    }

    tablink = tab.getElementsByTagName('a')[0];
    if ( !tablink ) {
        return;
    }

    tablink.firstChild.nodeValue = '+';
    if ( mw.config.get( 'skin' ) === 'monobook' ) {
      tablink.style.paddingLeft = ".4em";
      tablink.style.paddingRight = ".4em";
    }
});