User:Lost Labyrinth/general/quicklicenseoasis.js

/* Quick image license - contains the most commonly used licensing criteria - fixed for Oasis */ function QLicenseUI { var options = { : ,		'== Licensing ==\n': 'Fanon image', '== Licensing ==\n': 'Sim from TS1', '== Licensing ==\n': 'Screenshot from TS1', '== Licensing ==\n': 'Lot from TS1', '== Licensing ==\n': 'Sim from TS2', '== Licensing ==\n': 'Screenshot from TS2', '== Licensing ==\n': 'Lot from TS2', '== Licensing ==\n': 'Sim from TS3', '== Licensing ==\n': 'Screenshot from TS3', '== Licensing ==\n': 'Lot from TS3', '== Licensing ==\n': 'Sim from TS4', '== Licensing ==\n': 'Screenshot from TS4', '== Licensing ==\n': 'Lot from TS4', '== Licensing ==\n': 'Sim from Life Stories', '== Licensing ==\n': 'Lot from Life Stories', '== Licensing ==\n': 'Screenshot from Life Stories', '== Licensing ==\n': 'Sim from Pet Stories', '== Licensing ==\n': 'Lot from Pet Stories', '== Licensing ==\n': 'Screenshot from Pet Stories', '== Licensing ==\n': 'Lot from Castaway Stories', '== Licensing ==\n': 'Screenshot from Castaway Stories', '== Licensing ==\n': 'Sim from a console game', '== Licensing ==\n': 'Screenshot from a console game', '== Licensing ==\n': 'An object', '== Licensing ==\n': 'A pet', '== Licensing ==\n': 'Box art', '== Licensing ==\n': 'An object', '== Licensing ==\n': 'A memory', '== Licensing ==\n': 'A moodlet', '== Licensing ==\n': 'A moodlet with no frame', '== Licensing ==\n': 'A trait', '== Licensing ==\n': 'A zodiac sign', '== Licensing ==\n': 'A game logo or icon', '== Licensing ==\n': 'A want or fear', '== Licensing ==\n': 'Something from the game interface', '== Licensing ==\n': 'A promotional image', '== Licensing ==\n': 'Something else from The Sims series/other EA-copyrighted image', '== Licensing ==\n': 'Something part of the Wikia interace', '== Licensing ==\n': 'Fair use', '== Licensing ==\n': 'This is licensed under Creative Commons Attribution 3.0 (free license)', '== Licensing ==\n': 'This is licensed under GFDL (free license)', '== Licensing ==\n': 'Public domain', '== 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); }