User:Lasifer/wikia.js

Note: After saving, you have to bypass your browser's cache to see the changes.

Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5. Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R. Opera users have to clear their caches through Tools→Preferences Konqueror and Safari users can just click the Reload button. Chrome: press Ctrl+F5 or Shift+F5

// ******************* // 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 // **************