Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
//// licenseChecker // checks whether the selected license on Special:Upload is valid// and provides feedback//// Maintainer: [[User:Dschwen]]//varlicenseChecker={//// List of invalid licenses//invalid:["subst:nld","subst:template 2|cc-by-nc-sa-2.0|flickrreview","subst:template 2|flickrreview|subst:nld"],//// Translations of the warning message//i18n:{'de':'Die ausgewählte <b>Lizenz ist nicht akzeptabel für Wikimedia Commons</b>. Dein <b>Upload wird gelöscht</b> werden!','en':'The selected licensing is <b>unacceptable on Wikimedia Commons</b> and will lead to the <b>deletion</b> of your upload!'},licensemenu:null,warnbanner:null,message:'',// cross-browser event attachment (John Resig)// http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.htmladdEvent:function(obj,type,fn){if(obj.addEventListener)obj.addEventListener(type,fn,false);elseif(obj.attachEvent){obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event);}obj.attachEvent("on"+type,obj[type+fn]);}},// Event handler for the license selectorcheck:function(){with(licenseChecker){for(varnininvalid)if(licensemenu.value==invalid[n]){warnbanner.innerHTML=message;return;}warnbanner.innerHTML='';}},install:function(){if(window.location.href=="http://commons.wikimedia.org/wiki/Special:Upload"){with(licenseChecker){warnbanner=document.createElement('DIV');warnbanner.className='center';warnbanner.style.color='red';warnbanner.style.background='#eeeeee';varuploadtext=document.getElementById('uploadtext');// Check for skins not providing the uploadtext IDif(typeof(uploadtext)=='undefined')return;uploadtext.appendChild(warnbanner);if(typeof(i18n[mw.config.get('wgUserLanguage')])=='string')message=i18n[mw.config.get('wgUserLanguage')];elsemessage=i18n.en;licensemenu=document.getElementById('wpLicense');addEvent(licensemenu,'change',check);}}}}$(licenseChecker.install);