User:SmartboyConan/global.js

importScriptPage('User:Vuh/ChatHacks.js', 'vuh'); importScriptPage('User:Roranoa_zoro/editsummaries.js', 'c'); importScriptPage('User:Super Miron/chat-mod-calendar.js', 'clubpenguin'); //Javascripts importArticles({   type: "script",    articles: [        "u:dev:MediaWiki:AjaxBatchDelete/code.js",        "u:dev:MediaWiki:FloatingToc/code.js",        "u:dev:MediaWiki:SearchSuggest/code.js",        "u:dev:MediaWiki:FixMultipleUpload/code.js",        "u:dev:MediaWiki:Standard_Edit_Summary/code.js",        "u:dev:MediaWiki:AutoEditDropdown/code.js",        "u:dev:MediaWiki:BackToTopButton/code.js",        "u:dev:MediaWiki:InactiveUsers/code.js",        "u:dev:MediaWiki:RelatedDiscussionsModule/code.js",        "u:dev:MediaWiki:View_Source/code.js",        "u:dev:MediaWiki:RevealAnonIP/code.js",        "u:dev:MediaWiki:VisualSpellCheck/code.js",        "u:dev:MediaWiki:SpoilerAlert/code.js",        "u:dev:MediaWiki:SearchGoButton/code.js",        "u:dev:MediaWiki:FastDelete/code.js",        "u:dev:MediaWiki:SkinSwitchButton/code.js",        "u:dev:MediaWiki:HeaderLinks/code.js",        "u:dev:MediaWiki:TabKeyInserter/code.js", "u:dev:MediaWiki:FindAndReplace/code.js", "u:dev:MediaWiki:CategoryRenameAuto-update/code.js", "u:dev:MediaWiki:RedirectManagement/code.js", "u:dev:MediaWiki:Novasis14/code.js", "u:dev:MediaWiki:QuickToolsv2/code.js", "u:dev:MediaWiki:AjaxDiff/code.js", "u:dev:MediaWiki:CleanWantedFiles/code.js", "u:dev:MediaWiki:CapsFirst/code.js", "u:dev:MediaWiki:FileUsageAuto-update/code.js", "u:dev:MediaWiki:PageRenameAuto-update/code.js", "u:dev:MediaWiki:CategoryRenameAuto-update/code.js", "u:dev:MediaWiki:AjaxUndo/code.js", "u:dev:MediaWiki:JWB/load.js" ] }); //Ajax Redirect importScriptPage('MediaWiki:AjaxRedirect/code.js', 'dev'); //List Files importArticles({ type: "script", articles: [ "u:dev:MediaWiki:ListFiles/code.js" // ListFiles from Dev Wiki ] }); //Recent Changes Multiple importArticles({ type: "script", articles: [ "u:dev:MediaWiki:RecentChangesMultiple/code.2.js" ] }); //Purge Button importScriptPage( 'MediaWiki:PurgeButton/code.js', 'dev' ); var PurgeButtonText = 'Refresh'; //Mark For Deletion importArticles({ type: "script", articles: [ "w:c:dev:MediaWiki:MarkForDeletion/code.js" ] }); //AutoEditPages importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:AutoEditPages/code.js' ] }); /* change wiki activity to recent changes */ function WikiActivity2RecentChanges {	$('.wikia-button[data-id$="wikiactivity"]').replaceWith('Recent Changes'); } addOnloadHook(WikiActivity2RecentChanges); //Ajax RC importScriptPage('MediaWiki:AjaxRC/code.js', 'dev'); function AddRecentChanges {	$('div.buttons').css({'width': '310px'});	$('a[data-id="wikiactivity"]').after('Recent Changes'); } addOnloadHook(AddRecentChanges); /* Auto Refresh */ AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges","Special:WikiActivity"]; importScriptPage('MediaWiki:AjaxRC/code.js', 'dev'); /* Code for custom edit buttons (ō, ū characters). */ if (mwCustomEditButtons) { /*** wrappers *****/ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/deadmanwonderland/images/e/e1/O_Accent_Button.png", "speedTip": "Add the ō character", "tagOpen": "ō", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/deadmanwonderland/images/d/db/U_Accent_Button.png", "speedTip": "Add the ū character", "tagOpen": "ū", "tagClose": "", "sampleText": ""}; } /*  */ //Add this to your global.js file (http://c.wikia.com/wiki/Special:MyPage/global.js) /* Roranoa's chat hacks */ /* Originally by Monchoman45*/ /* change wiki activity to recent changes - 2/1/11 */ function WikiActivity2RecentChanges { $('a.wikia-button[data-id$="wikiactivity"]').replaceWith('Recent Changes'); } /*Roranoa's chat hacks*/ importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:APIQuery.js&action=raw&ctype=text/javascript'); importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:B3.js&action=raw&ctype=text/javascript'); importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:WhamAPI.js&action=raw&ctype=text/javascript'); importScriptURI('http://c.wikia.com/index.php?title=User:Monchoman45/ChatHacks.js&action=raw&ctype=text/javascript'); /* Chat options */ var chatOptionsLoaded; if (chatOptionsLoaded != 1){ chatOptionsLoaded = 1; importScriptPage('MediaWiki:Chat.js/options.js','cod'); } /* Block Chat Messages */ if (mw.config.get('wgPageName') === 'Special:Chat') { $(function {        "use strict";        function createUl(blockee) {            var isBlocked = $("#WikiChatList>li[data-user='"+blockee+"']").hasClass("blockee");            if (isBlocked === false) {                $('.regular-actions').after('  Block Messages ');            } else {                $('.regular-actions').after('  Allow Messages ');            }	            $("li.ignore").click(function { ignore(blockee); });        }        function ignore(blockee) {            var blockStyle;			var blockee = blockee;            var isBlocked = $("#WikiChatList>li[data-user='"+blockee+"']").hasClass("blockee");            var isMod = $("#WikiChatList>li[data-user='"+blockee+"']").hasClass("chat-mod");            if (isMod === false) {                if (isBlocked === false) {                    $("li.ignore").addClass("blue");                    blockStyle = document.createElement("style"); blockStyle.innerHTML = ("li[data-user='"+blockee+"']:not(.User){display: none;}"); blockStyle.setAttribute("id", "blockStyle-"+blockee); document.head.appendChild(blockStyle); $("#WikiChatList>li[data-user='"+blockee+"']").addClass("blockee"); $(".UserStatsMenu li.ignore>span.label").replaceWith(" Allow Messages "); } else { $("li.ignore").removeClass("blue"); blockStyle = document.getElementById("blockStyle-"+blockee); blockStyle.parentNode.removeChild(blockStyle); $("#WikiChatList>li[data-user='"+blockee+"']").removeClass("blockee"); $(".UserStatsMenu li.ignore>span.label").replaceWith(" Block Messages "); }           } else { var lastMsg = $('.Chat>ul>li:last-child'); var lastMsgIsAlert = lastMsg.hasClass("inline-alert"); if (lastMsgIsAlert === true) { lastMsg.after("You cannot block chat moderators, administrators, or Wikia staff members."); } else { lastMsg.after("<li class='inline-alert' style='color:red'>You cannot block chat moderators, administrators, or Wikia staff members.</li>"); }           }        }        function createUlCall { var blockee = $(this).attr('data-user'); setTimeout(function { createUl(blockee); }, 0); }       $("#WikiChatList").on("click", "li.User", createUlCall); var messageBlockerStyle = document.createElement("style"); messageBlockerStyle.innerHTML = ".UserStatsMenu .actions li.ignore .icon { background-image: url('http://images.wikia.com/dzy/images/8/81/Sprite-chat-ignore.png'); } .UserStatsMenu .actions li.ignore .icon { background-position: -0px 0; } .UserStatsMenu .actions li.ignore:hover .icon { background-position: -31px 0; } .UserStatsMenu .actions li.ignore.blue .icon { background-position: -67px 0; } .UserStatsMenu .actions li.ignore.blue:hover .icon { background-position: -98px 0; } #WikiChatList>li.blockee { background: #FFE6D8; !important } .ignore span.label { position: relative; bottom: 5px; left: 3px; }"; document.head.appendChild(messageBlockerStyle); }); } //Import AjaxUnsigned importScriptURI('https://raw.github.com/PrincessPlatinum/Ajax-Scripts/master/Unsigned.js'); //Edit count tab $(function { var loc = window.location.href; var username = (wgTitle == "Contributions") ? loc.substring(loc.lastIndexOf("/")+1) : wgTitle; $('.tabs-container > ul.tabs').append('<li data-id="editcount">Editcount</a></li>'); }); //Siggify    $(function(window, $, mw, mwConfig) { if (mwConfig.wgPageName === "Special:Siggify") { importScriptPage('User:Princess Platinum/Siggify.js', 'creepypasta'); var specialPage = ' Text Options Font: <select id="font-selector"><optgroup label="Serif"><option value="Georgia">Georgia <option value="Palatino">Palatino <option value="Times">Times <optgroup label="Sans-Serif"><option value="Arial">Arial <option value="Arial-Black">Arial-Black <option value="Comic-Sans">Comic-Sans <option value="Impact">Impact <option value="Lucidia-Grande">Lucidia Grande <option value="Geneva">Geneva <option value="Helvetica">Helvetica <option value="Verdana">Verdana  <optgroup label="Monospace"><option value="Courier">Courier <option value="Monaco">Monaco   Username: <input type="text" id="username"> Username Link Text: <input type="text" id="username-text"> Username Link Color: <input type="text" id="username-color">  Talkpage Link Text: <input type="text" id="talkpage-text"> Talkpage Link Color: <input type="text" id="talkpage-color"> Border and Background Border Type: <select id="border-type"><option value="Dashed">Dashed <option value="Dotted">Dotted <option value="Double">Double <option value="Groove">Groove <option value="Inset">Inset <option value="Outset">Outset <option value="Ridge">Ridge <option value="Solid">Solid  Border Width: <select id="width-selector"> 1 pixel  2 pixels  3 pixels  4 pixels  5 pixels   Border Color: <input type="text" id="border-color"> Background Color: <input type="text" id="background-color">  Border Radius (Top Left): <input type="text" id="top-left"> Border Radius (Top Right): <input type="text" id="top-right"> Border Radius (Bottom Right): <input type="text" id="bottom-right"> Border Radius (Bottom Left): <input type="text" id="bottom-left">  <button onclick="siggify" id="submit-button">Submit  Code: <textarea rows="10" cols="50" name="comments" id="code-output">   Made By: Princess Platinum '; $('.WikiaArticle').html(specialPage); }   }(this, this.jQuery, this.mediaWiki, mediaWiki.config.values)); //Fate Delete var fdButtons = []; fdButtons[fdButtons.length] = {  'summary': 'spam',  'label': 'SP'}; fdButtons[fdButtons.length] = {  'summary': 'vandalism',  'label': 'VA'}; fdButtons[fdButtons.length] = {  'summary': 'Housekeeping',  'label': 'HK'}; fdButtons[fdButtons.length] = {  'summary': 'Spam/Self-Answered Question',  'label': 'Self'}; fdButtons[fdButtons.length] = {  'summary': 'Not a Question/Nonsensical Question',  'label': 'NotAQ'}; fdButtons[fdButtons.length] = {  'summary': 'Not About Code Geass',  'label': 'NotB'}; fdButtons[fdButtons.length] = {  'summary': 'Please see the main page. Te anime has ended. It is not coming back',  'label': 'Anime'}; //Cache Check cacheSkip = []; cacheSkipLimit = 1000; importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:CacheCheck/code.js' ] }); /* Make Visual Editor links load the regular editor instead */ if ($.getUrlVar('veaction') == 'edit') location.replace(document.URL.replace('veaction','action'));