User:The Wikia Contributor/global.js

importScriptPage('User:Monchoman45/ChatHacks.js', 'community');

function QLicenseUI { window.qapi = new APIQuery; var options = { '': 'Public domain', '': 'Game Screenshot', '': 'Fair use' };	var optstr = ''; for(i in options) {optstr += '' + options[i] + ' ';} var html = '' + optstr + ' Add license'; if(document.getElementById('LicensedFile') || document.getElementById('Copyright')) {html += ' This file is licensed. ';}	else {html += ' This file is not licensed. ';}	$('#filetoc').append(html); document.getElementById('aSubmit').onclick = function(event) { qapi.send(new qapi.Query(qapi, 'POST', 'action=edit&title=' + wgPageName + '&appendtext=' + document.getElementById('QLicenseSelect').value + '&summary=Licensing image', function(result) { if(result.edit.result == 'Success') {window.location = wgServer + '/index.php?title=' + wgPageName + '&action=purge';} else {alert('An error occurred while submitting the edit.');} }));		this.innerHTML = ''; } } if(wgCanonicalNamespace == 'File') { addOnloadHook(QLicenseUI); importScriptPage('MediaWiki:APIQuery.js', 'monchbox'); }

// Adds an "Oasis"-button to Monobook; by User:Tm_T function add_skin_tab {       var URL = wgServer + wgScript + '?title=' + wgPageName + '&useskin=wikia' addPortletLink('p-cactions', URL, "oasis"); }   addOnloadHook(add_skin_tab);