Difference between revisions of "MediaWiki:Common.js"

From Drawn to Life Wiki
Line 9: Line 9:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/f/f9/City_Wall_Background.png/revision/latest?cb=20160629180154) top center no-repeat fixed')
+
     $('body').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')
Line 24: Line 24:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/c/c9/BeachgateBG.png/revision/latest?cb=20160606134434) top center no-repeat fixed')
+
     $('body').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')
Line 39: Line 39:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('.skin-oasis').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/7/72/SnowGate_Mountains_Background.png/revision/latest?cb=20160425205730) top center no-repeat fixed')
+
     $('.skin-oasis').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('.skin-oasis').css('background-size', 'cover')
 
     $('.skin-oasis').css('background-size', 'cover')
Line 53: Line 53:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/3/38/TwiliteBGTrees.png/revision/latest?cb=20160428133906) top center no-repeat fixed')
+
     $('body').css('background', 'url(https://drawntolife.wiki/w/backgrounds/GearWorks_Background.png) top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')
Line 68: Line 68:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/1/1a/WilfresWasteland_Background_%28Lighter%29.jpg/revision/latest?cb=20160428154823) top center no-repeat fixed')
+
     $('body').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')
Line 82: Line 82:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/6/64/GalacticJungle_Background_%28Lighter%29.jpg/revision/latest?cb=20160428153304) top center no-repeat fixed')
+
     $('body').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')
Line 96: Line 96:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/8/8e/Lavasteam_Background_%28Lighter%29.jpg/revision/latest?cb=20160428152821) top center no-repeat fixed')
+
     $('body').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')
Line 110: Line 110:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/5/5a/Watersong_Background_%28Lighter%29.jpg/revision/latest?cb=20160428151916) top center no-repeat fixed')
+
     $('body').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')
Line 125: Line 125:
 
         "use strict";
 
         "use strict";
 
   
 
   
     $('body').css('background', 'url(https://vignette.wikia.nocookie.net/drawntolife/images/e/e5/SteamBackdrop.jpg/revision/latest?cb=20201105173515) top center no-repeat fixed')
+
     $('body').css('background', 'url() top center no-repeat fixed')
 
   
 
   
 
     $('body').css('background-size', 'cover')
 
     $('body').css('background-size', 'cover')

Revision as of 12:36, 23 March 2021


/* Any JavaScript here will be loaded for all users on every page load. */

// ------------ CITY GATE
if ($.inArray("City Gate", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url() top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}
 
 
// ------------ BEACH GATE
if ($.inArray("Beach Gate", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url() top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}
 

// ------------ SNOW GATE
if ($.inArray("Snow Gate", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('.skin-oasis').css('background', 'url() top center no-repeat fixed')
 
    $('.skin-oasis').css('background-size', 'cover')
 
    });
}
 
// ------------ FOREST GATE
if ($.inArray("Forest Gate", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url(https://drawntolife.wiki/w/backgrounds/GearWorks_Background.png) top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}
 
 
// ------------ WILFRE'S WASTELAND
if ($.inArray("Wilfre's Wasteland", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url() top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}
 
// ------------ GALACTIC JUNGLE
if ($.inArray("Galactic Jungle", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url() top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}
 
// ------------ LAVASTEAM
if ($.inArray("Lavasteam", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url() top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}
 
// ------------ WATERSONG
if ($.inArray("Watersong", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url() top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}
 
 
// ------------ TwoRealms
if ($.inArray("Drawn to Life: Two Realms", mw.config.get('wgCategories')) > -1) {
 
    $(function () {
 
        "use strict";
 
    $('body').css('background', 'url() top center no-repeat fixed')
 
    $('body').css('background-size', 'cover')
 
    });
}