User:MysteriousForce/wikia.js

// ******************* // Custom edit buttons // ******************* if (wgAction == "edit" || wgAction == "submit") { /***** Custom 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://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#redirect",               "tagClose": "", "sampleText": "PAGE"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/__cb20100708142061/callofduty/images/b/b9/Button_Bblock.jpg", "speedTip": "B", "tagOpen": "", "tagClose": " "+"~"+"}}", "sampleText": "REASON"}; } } // *********************************** // Kill image popups (code from Rappy) // *********************************** window.wgEnableImageLightboxExt = false; function changeimagelinks { if (window.skin == 'oasis') { var article = $('#WikiaArticle, .LatestPhotosModule, #article-comments'); }   else { var article = $('#bodyContent'); }   article.unbind('click.lightbox'); var a = document.getElementsByTagName("a"); for ( var t = 0; t < a.length; ++t ) { var a2 = a[t]; var img = a2.getElementsByTagName("img"); if ( img[0] != null ) { if ( a2.href.indexOf("images.wikia.com") != -1 ) { var link = wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1); a2.setAttribute('href',link); }       }    } } addOnloadHook(changeimagelinks); // *************************************** // End Kill image popups (code from Rappy) // *************************************** // **** // WHAM // **** importScriptPage('User:Joeyaa/wham.js','vstf'); // ******** // End WHAM // ******** // ************************************************ // QLicense by User:Cakemix, decoded and formatted. // ************************************************ /* * QLicense.js, [originally] by User:Cakemix, decoded and formatted. * Decoded, formatted, and shortened by Monchoman45. */ function QLicenseUI { var options = { '': 'Lesson Zero images', '': 'FanmadeImages', '': 'RainbowDash Images', '': 'PinkiePie Images', '': 'Applejack Images', '': 'Rarity Images', '': 'Twilight Images', '': 'Fluttershy Images', };	var optstr = ''; for(i in options) {optstr += '' + options[i] + ' ';} var html = '' + optstr + ' Add'; 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, 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'); } // **************************************************** // End QLicense by User:Cakemix, decoded and formatted. // **************************************************** // ********** // Fastdelete // ********** importScriptPage('FastDelete/code.js', 'dev'); var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Unused file', 'label': 'unufile'}; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'spam'}; fdButtons[fdButtons.length] = { 'summary': 'Unnecessary', 'label': 'unnec'}; // ************** // End Fastdelete // **************