User:WOSlinker/monobook.js

Source: 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.
// mw.loader.load('/w/index.php?title=User:WOSlinker/rugby.js&action=raw&ctype=text/javascript');
// mw.loader.load('/w/index.php?title=User:WOSlinker/musartist.js&action=raw&ctype=text/javascript');
// mw.loader.load('/w/index.php?title=User:WOSlinker/userbox.js&action=raw&ctype=text/javascript');

//mw.loader.load('/w/index.php?title=User:WOSlinker/hlist-private.js&action=raw&ctype=text/javascript');
//mw.loader.load( '/w/index.php?title=User:WOSlinker/tidystyle.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/issn.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/font.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/imdb.js&action=raw&ctype=text/javascript' );
//mw.loader.load('/w/index.php?title=User:Frietjes/findparameterdups.js&action=raw&ctype=text/javascript'); // [[User:Frietjes/findparameterdups.js]]
//mw.loader.load( '/w/index.php?title=User:WOSlinker/album.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/tennis.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/portal.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/lint.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/age.js&action=raw&ctype=text/javascript' ); 
//mw.loader.load( '/w/index.php?title=User:WOSlinker/small.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/remove.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/asscats.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/source.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/fontlinks.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/medal-table-headers.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/center.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/testing.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/w/index.php?title=User:WOSlinker/lint2.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/infobox.js&action=raw&ctype=text/javascript' );
//mw.loader.load( '/w/index.php?title=User:WOSlinker/seattle.js&action=raw&ctype=text/javascript' );

//Useful scripts
//Add a 'null edit' tab
if(mw.config.get('wgNamespaceNumber') != -1 && mw.config.get('wgArticleId') != 0) { 
    $( function nullEditButton() {
        mw.util.addPortletLink('p-cactions', 
                       mw.util.getUrl(null,{action:'edit',nulledit:true}),
                       'null',
                       'p-null',
                       'Null edit this page2');
    }
)}
 
if(mw.config.get('wgAction') == 'edit' && queryString('nulledit') == 'true') {
    $(function nullEdit() {
        document.getElementById('wpSave').click();
    }
)}
 
function queryString(p) {
    var re = RegExp('[&?]' + p + '=([^&]*)');
    var matches;
    if (matches = re.exec(document.location)) {
        try { 
            return decodeURI(matches[1]);
        } catch (e) { }
    }
    return null;
}

function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
};






/****


function expandTable()
{
  var autoCollapse = 2;
  var collapseCaption = "hide";
  var expandCaption = "show";

  for ( var tableIndex = 1; tableIndex  < 100; tableIndex ++ ) {

    var Button = document.getElementById( "collapseButton" + tableIndex );
    var Table = document.getElementById( "collapsibleTable" + tableIndex );
 
    if ( !Table || !Button ) {
        return false;
    }
 
    var Rows = Table.rows;
 
    if ( Button.firstChild.data == expandCaption ) {
        for ( var i = 1; i < Rows.length; i++ ) {
            Rows[i].style.display = Rows[0].style.display;
        }
        Button.firstChild.data = collapseCaption;
    }
  }
}

if ( mw.config.get('wgPageName').indexOf("Talk\:")>-1 || mw.config.get('wgPageName').indexOf("talk\:")>-1 ) {
    $( expandTable );
}

****/