MediaWiki:Gadget-quicklicense.js

/* Quick image license - contains the most commonly used licensing criteria - fixed for Oasis */ function QLicenseUI { var options = { : ,		'\n== Licensing ==\n': 'Fanon image', '\n== Licensing ==\n': 'Sim from TS1', '\n== Licensing ==\n': 'Screenshot from TS1', '\n== Licensing ==\n': 'Lot from TS1', '\n== Licensing ==\n': 'Sim from TS2', '\n== Licensing ==\n': 'Screenshot from TS2', '\n== Licensing ==\n': 'Lot from TS2', '\n== Licensing ==\n': 'Sim from TS3', '\n== Licensing ==\n': 'Screenshot from TS3', '\n== Licensing ==\n': 'Lot from TS3', '\n== Licensing ==\n': 'Sim from TS4', '\n== Licensing ==\n': 'Screenshot from TS4', '\n== Licensing ==\n': 'Lot from TS4', '\n== Licensing ==\n': 'Sim from Life Stories', '\n== Licensing ==\n': 'Lot from Life Stories', '\n== Licensing ==\n': 'Screenshot from Life Stories', '\n== Licensing ==\n': 'Sim from Pet Stories', '\n== Licensing ==\n': 'Lot from Pet Stories', '\n== Licensing ==\n': 'Screenshot from Pet Stories', '\n== Licensing ==\n': 'Lot from Castaway Stories', '\n== Licensing ==\n': 'Screenshot from Castaway Stories', '\n== Licensing ==\n': 'Sim from a console game', '\n== Licensing ==\n': 'Screenshot from a console game', '\n== Licensing ==\n': 'An object', '\n== Licensing ==\n': 'A pet', '\n== Licensing ==\n': 'Box art', '\n== Licensing ==\n': 'A memory', '\n== Licensing ==\n': 'A moodlet', '\n== Licensing ==\n': 'A moodlet with no frame', '\n== Licensing ==\n': 'A trait', '\n== Licensing ==\n': 'A zodiac sign', '\n== Licensing ==\n': 'A game logo or icon', '\n== Licensing ==\n': 'A want or fear', '\n== Licensing ==\n': 'Something from the game interface', '\n== Licensing ==\n': 'A promotional image', '\n== Licensing ==\n': 'A game render', '\n== Licensing ==\n': 'Something else from The Sims series/other EA-copyrighted image', '\n== Licensing ==\n': 'Something part of the Wikia interace', '\n== Licensing ==\n': 'Fair use', '\n== Licensing ==\n': 'This is licensed under Creative Commons Attribution 3.0 (free license)', '\n== Licensing ==\n': 'This is licensed under GFDL (free license)', '\n== Licensing ==\n': 'Public domain', '\n== Licensing ==\n': 'License unknown' };	var optstr = ''; for ( i in options ) { if ( options.hasOwnProperty( i ) ) { optstr += '' + options[i] + ' '; }	}	var html = '' + optstr + ' Add license'; if($('#LicensedFile').length || $('#Licensing').length) { html += ' This file is licensed. ';	} else { html += ' This file is not licensed. ';	}	$('#WikiaPageHeader').append(html); $('#aSubmit').click( function(event) {		this.innerHTML = '';		$.post("/api.php", {action: "edit", title: mw.config.get("wgPageName"), token: mw.user.tokens.values.editToken, bot: true, appendtext: $("#QLicenseSelect").val, summary: "Licensing image."}, function (result) { window.location = wgServer + '/index.php?title=' + mw.config.get("wgPageName") + '&action=purge'; });	}); } if (wgCanonicalNamespace == 'File') { addOnloadHook(QLicenseUI); }