Difference between revisions of "MediaWiki:Common.js"

From Bose Portable PA Encyclopedia
Jump to: navigation, search
m
m (Replaced content with "Any JavaScript here will be loaded for all users on every page load.: ")
(Tag: Replaced)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
$(document).ready(function () {
 
 
 
//if (mw.config.get('wgUserName') != "ST") {
 
 
if (jQuery.inArray("sysop", mw.config.get('wgUserGroups'))) > -1 {
 
 
 
    //Disable cut copy paste
 
    $('body').bind('cut copy paste', function (e) {
 
        e.preventDefault();
 
    });
 
 
 
    //Disable mouse right click
 
    $("body").on("contextmenu",function(e){
 
        return false;
 
    });
 
 
} else {
 
 
//jQuery.inArray( "John", arr )
 
 
alert("Hi " +  mw.config.get('wgUserName') + " "    ) ;
 
 
 
 
};
 
 
 
 
});
 

Latest revision as of 04:02, 13 November 2019

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