MediaWiki:Common.js

From Break The Targets Wiki
Revision as of 00:34, 31 March 2018 by Qual (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Code here will be executed for each user on every page */
var mapURLbase = "http://q-prod.net/BTT/Pictures/Levels/";
if ($("#firstHeading").text()== "Classic Levels")
{
    i=1;
    $( "tr td:last-child" ).each(function(){
        $( this ).html('<a href="'+mapURLbase+'Classic/Stage%20'+i+'.png" title="Level '+i+'">Level'+i+'.png</a>')
        i++;
    })
}
else
if ($("#firstHeading").text()== "Tribute Pack")
{
    i=1;
    $( "tr td:last-child" ).each(function(){
        
        $( this ).html('<a href="'+mapURLbase+'SSBM/Melee%20-%20'+"0".repeat(i<10)+i+'.png" title="Tribute '+i+'">Tribute'+"0".repeat(i<10)+i+'.png</a>')
        i++;
    })
}
else
if ($("#firstHeading").text()== "Juggle")
{
    i=1;
    $( "tr td:last-child" ).each(function(){
        
        $( this ).html('<a href="'+mapURLbase+'Juggle/Juggle%20'+i+'.png" title="Tribute '+i+'">Tribute'+"0".repeat(i<10)+i+'.png</a>')
        i++;
    })
}