Difference between revisions of "MediaWiki:Common.js"

From SP World Wiki
Jump to navigation Jump to search
Line 6: Line 6:
 
     if (mw.config.get('wgCategories').indexOf('Mattyverse') !== -1) {
 
     if (mw.config.get('wgCategories').indexOf('Mattyverse') !== -1) {
 
         $('body').css({
 
         $('body').css({
 +
            'background': '#B6E8FF url(https://www.worldofsp.com/wiki/images/8/8f/MattyversePageBG.png) 0 0 repeat'
 +
        });
 +
        $('#mw-head, mw-head-base').css({
 
             'background': '#B6E8FF url(https://www.worldofsp.com/wiki/images/8/8f/MattyversePageBG.png) 0 0 repeat'
 
             'background': '#B6E8FF url(https://www.worldofsp.com/wiki/images/8/8f/MattyversePageBG.png) 0 0 repeat'
 
         });
 
         });
 
     }
 
     }
 
});
 
});

Revision as of 15:24, 23 February 2025

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

// Mattyverse specific

$(document).ready(function() {
    if (mw.config.get('wgCategories').indexOf('Mattyverse') !== -1) {
        $('body').css({
            'background': '#B6E8FF url(https://www.worldofsp.com/wiki/images/8/8f/MattyversePageBG.png) 0 0 repeat'
        });
        $('#mw-head, mw-head-base').css({
            'background': '#B6E8FF url(https://www.worldofsp.com/wiki/images/8/8f/MattyversePageBG.png) 0 0 repeat'
        });
    }
});