User:Laagone/wikia.js

/* * QLicense.js, [originally] by User:Cakemix, decoded and formatted. * Decoded, formatted, and shortened by Monchoman45. */ function QLicenseUI { 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) { api.send(new api.Query(api, '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'); }

//Custom shiny edit buttons if (mwCustomEditButtons) {

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20100502153339/callofduty/images/1/17/Button_Ssig.jpg", "speedTip": "Signature", "tagOpen": " ~"+""+"", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/__cb20100304205745/callofduty/images/0/03/Al-Asad.jpg", "speedTip": "Speedy delete", "tagOpen": "{{Sdelete", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/callofduty/images/a/aa/MLGisNot4Me_wikia.js_redirect_button.jpg", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",               "tagClose": "", "sampleText": "Page"};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images4.wikia.nocookie.net/__cb20080426223603/callofduty/images/2/2a/Replacement_filing_cabinet.svg", "speedTip": "Archive", "tagOpen": "", "tagClose": "", "sampleText": ""};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/__cb20070329065150/central/images/d/d5/Button_noinclude.png", "speedTip": "Noinclude", "tagOpen": "<"+"noinclude"+">[[Category:",               "tagClose": "]]<"+"/noinclude"+">", "sampleText": "Text"};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20080111185517/central/images/6/60/Button_support.png", "speedTip": "Support", "tagOpen": " ", "tagClose": " ~"+""+"", "sampleText": "Reasoning"};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20080111185614/central/images/9/98/Button_oppose.png", "speedTip": "Oppose", "tagOpen": " ", "tagClose": " ~"+""+"", "sampleText": "Reasoning"};

}

//End custom shiny edit buttons

//Speedy delete buttons

importScriptPage('FastDelete/code.js', 'dev');

var fdButtons = [];

fdButtons[fdButtons.length] = { 'summary': 'Unused file', 'label': 'unu'}; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'spam'}; fdButtons[fdButtons.length] = { 'summary': 'Unnecessary', 'label': 'unnec'}; fdButtons[fdButtons.length] = { 'summary': 'Leaked/not confirmed', 'label': 'leak'};

//End speedy delete buttons