User:Shodai Tsuchi/scripts.js

// Imports Scripts importArticles({   type: 'script',    articles: [    'u:dev:PortableCSSPad/code.js',    'u:dev:RevealAnonIP/usercode.js',    'u:dev:LastEdited/code.js',    'u:dev:AjaxBatchDelete/code.2.js',    'u:dev:View_Source/code.js',    'u:dev:AjaxUndo/code.js',    'u:dev:PurgeButton/code.js',    'u:dev:Message/code.js',    'u:dev:AutoEditDropdown/code.js',    'u:dev:Quick_Management/code.js',    'u:dev:CategoryRenameAuto-update/code.js',    'u:dev:AjaxDiff/code.js',    'u:dev:AutoEditPages/code.js',    'u:dev:AjaxRC/code.js',    'u:dev:AjaxUndo/code.js',    'u:kiddo:User:Shodai_Tsuchi/AjaxUndoPersonal.js',    'u:cod:User:Madnessfan34537/redlinkfix.js',    'u:cod:User:Madnessfan34537/userlinks.js',    'u:kiddo:User:Shodai_Tsuchi/buttons.js',    'u:dev:QuickContribs/code.js',     'u:dev:WHAM/code.js',    'u:dev:QuickCreateUserPage/code.js',    'u:dev:QuickTemplate/code.js',    ] }); function AnonIP { var list = document.getElementsByTagName('a'); for(var i in list) { if(list[i].href && list[i].href.indexOf('Special:Contributions/') && list[i].innerHTML == 'A Wikia contributor') { list[i].innerHTML = list[i].href.substring(list[i].href.lastIndexOf('/') + 1, list[i].href.length); }	} } addOnloadHook(AnonIP); function UnusedFiles { $('.gallerytext a').each(function {		$(this).html($(this).attr('title'));	}); } addOnloadHook(UnusedFiles);

// AJAX window.ajaxRefresh = 3000; AjaxRCRefreshText = 'AJAX'; AjaxRCRefreshHoverText = 'Automaticamente recarregar a página'; window.ajaxPages = [ "Special:WikiActivity", "Special:RecentChanges", "Special:Watchlist", "Special:Log", "Special:Contributions", "Special:Block", "Special:Unblock" ]; batchDeleteDelay = 10; var qtUserPageTemplate = ''; var qtEnableUserPageOverwrite = true; // FastDelete Buttons importScriptPage('FastDelete/code.js', 'dev'); var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'vandalism', 'label': 'V' }; fdButtons[fdButtons.length] = { 'summary': 'spam', 'label': 'S' }; fdButtons[fdButtons.length] = { 'summary': 'cleanup', 'label': 'C↑' }; fdButtons[fdButtons.length] = { 'summary': 'Violation of the ToU', 'label': 'ToU' }; fdButtons[fdButtons.length] = { 'summary': 'Sem sentido', 'label': 'SS' }; fdButtons[fdButtons.length] = { 'summary': 'Fanon content', 'label': 'FC' }; fdButtons[fdButtons.length] = { 'summary': 'Sem necessidade', 'label': 'SN' };

if (wgDBname == "wikia") { $("link[rel='shortcut icon'").attr("href",       "http://vignette2.wikia.nocookie.net/monchbox/images/f/f3/Icon-staff.png"    ); } // QuickBlock - Credit to w:User:Azuris // QuickUnblock - Credit to w:User:Shodai Tsuchi function quickBlock { var userArray = wgPageName.split(":"); $('.WikiaMenuElement').append('Block'); } if (wgCanonicalNamespace == 'User' || wgCanonicalNamespace == 'User_talk') { addOnloadHook(quickBlock); } function quickUnblock { var userArray = wgPageName.split(":"); $('.WikiaMenuElement').append('Unblock'); } if (wgCanonicalNamespace == 'User' || wgCanonicalNamespace == 'User_talk') { addOnloadHook(quickUnblock); }

//UserPage is an script based on code QuickCreateUserPage(@Grunny) - Written by Shodai Tsuchi

$('#WikiHeader').append('UserPage'); function UserPage { mw.util.addCSS(".modalWrapper{background-color:gray;"); $.showCustomModal('QuickCreateUserPage',       'Languages', {            id: "cancel",            width: 450,            buttons: [{                defaultButton: true,                message: "EN",                handler: function {                    en;            }            },{                message: "PT",                handler: function {                    pt;               }            },{                message: "ES",                handler: function {                    es;               }            },{                message: "FR",                handler: function {                    fr;               }            },{                message: "IT",                handler: function {                    it;               }            },{                message: "DE",                handler: function {                    de;               }        }] }); } function Saved {   alert("Saved!");    $("#cancel").closeModal;    location.reload; } function en {    $.post(mw.util.wikiScript("api"), { format: "json", action: "edit", title: "User:Shodai Tsuchi", text: "", summary: "Creating:userpage", token: mw.user.tokens.get("editToken"), success: Saved }); } function pt {   $.post(mw.util.wikiScript("api"), { format: "json", action: "edit", title: "User:Shodai Tsuchi", text: "", summary: "Creating:userpage", token: mw.user.tokens.get("editToken"), success: Saved }); } function es {   $.post(mw.util.wikiScript("api"), { format: "json", action: "edit", title: "User:Shodai Tsuchi", text: "", summary: "Creating:userpage", token: mw.user.tokens.get("editToken"), success: Saved }); } function fr {   $.post(mw.util.wikiScript("api"), { format: "json", action: "edit", title: "User:Shodai Tsuchi", text: "", summary: "Creating:userpage", token: mw.user.tokens.get("editToken"), success: Saved }); } function it {   $.post(mw.util.wikiScript("api"), { format: "json", action: "edit", title: "User:Shodai Tsuchi", text: "", summary: "Creating:userpage", token: mw.user.tokens.get("editToken"), success: Saved }); } function de {   $.post(mw.util.wikiScript("api"), { format: "json", action: "edit", title: "User:Shodai Tsuchi", text: "", summary: "Creating:userpage", token: mw.user.tokens.get("editToken"), success: Saved }); }