MediaWiki:Common.js

From Digital Sinology
Revision as of 19:18, 22 April 2018 by Dsturgeon (talk | contribs) (Created page with "Any JavaScript here will be loaded for all users on every page load.: if ( mw.config.get("wgPageName") == "Special:Upload" ) { $('input[name="wpUpload"][type="submit"]'...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
/* Any JavaScript here will be loaded for all users on every page load. */

if ( mw.config.get("wgPageName") == "Special:Upload" ) {
	$('input[name="wpUpload"][type="submit"]').mousedown(function() {
		if ( $("#wpLicense").val() == "No license" ) {
			$(this).attr("disabled","disabled").attr("title","Please select a license before uploading").css("cursor","disabled");
		}
	});
}