Difference between revisions of "MediaWiki:Common.js"
m |
m |
||
Line 5: | Line 5: | ||
//if (mw.config.get('wgUserName') != "ST") { | //if (mw.config.get('wgUserName') != "ST") { | ||
− | if (jQuery.inArray("sysop", mw.config.get('wgUserGroups') ) | + | if (jQuery.inArray("sysop", mw.config.get('wgUserGroups') ) == -1 ) { |
Revision as of 03:46, 13 November 2019
/* 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 {
console.write("UserName =" + mw.config.get('wgUserName'))
};
});