Difference between revisions of "MediaWiki:Common.js"

From Break The Targets Wiki
Jump to: navigation, search
Line 5: Line 5:
 
     i=1;
 
     i=1;
 
     $( "tr td:last-child" ).each(function(){
 
     $( "tr td:last-child" ).each(function(){
         $( this ).html('<a href="'+mapURLbase+'Classic/Stage%20'+i+'.png" title="Level '+i+'">Level'+i+'.png</a>')
+
         $( this ).html('<a href="'+mapURLbase+'Classic/thumb/Stage%20'+i+'.png" title="Level '+i+'">Level'+i+'.png</a>')
 
         i++;
 
         i++;
 
     })
 
     })
Line 15: Line 15:
 
     $( "tr td:last-child" ).each(function(){
 
     $( "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>')
+
         $( this ).html('<a href="'+mapURLbase+'SSBM/thumb/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/thumb/Juggle%20'+i+'.png" title="Tribute '+i+'">Tribute'+"0".repeat(i<10)+i+'.png</a>')
 
         i++;
 
         i++;
 
     })
 
     })
 
}
 
}

Revision as of 00:33, 31 March 2018

/* 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/thumb/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/thumb/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/thumb/Juggle%20'+i+'.png" title="Tribute '+i+'">Tribute'+"0".repeat(i<10)+i+'.png</a>')
        i++;
    })
}