User:Lost Labyrinth/general/quicklicense.js

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