Difference between revisions of "MediaWiki:Common.js"
From Suresh Joshi
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: $( function(){ if( mw.config.get('wgIsMainPage') ){ $('#firstHeading').remove(); $('#ca-nstab...") |
|||
Line 5: | Line 5: | ||
$('#firstHeading').remove(); | $('#firstHeading').remove(); | ||
$('#ca-nstab-main').hide(); | $('#ca-nstab-main').hide(); | ||
} | |||
if( mw.config.get('wgUserName') === null ){ | |||
$('body').bind('cut copy', function(e) { | |||
e.preventDefault(); | |||
}); | |||
} else { | |||
$("#content").removeAttr("onmousedown"); | |||
$("#content").removeAttr("onselectstart"); | |||
} | } | ||
}); | }); |
Revision as of 14:57, 26 September 2021
/* Any JavaScript here will be loaded for all users on every page load. */
$( function(){
if( mw.config.get('wgIsMainPage') ){
$('#firstHeading').remove();
$('#ca-nstab-main').hide();
}
if( mw.config.get('wgUserName') === null ){
$('body').bind('cut copy', function(e) {
e.preventDefault();
});
} else {
$("#content").removeAttr("onmousedown");
$("#content").removeAttr("onselectstart");
}
});