User:JustLeafy/global.js

/* Imports */ importArticles({   type: 'script',    articles: [        'u:dev:Less/code.2.js',        'u:dev:Wikimarks/code.js',        "u:dev:EditConflictAlert/code.js",        'w:c:dev:RevealAnonIP/code.js',        'u:dev:View Source/code.js',        'u:dev:DedicatedTalkButton.js',        'w:c:dev:VisualSpellCheck/code.js',        'u:dev:UTCClock/code.js',        'u:dev:AdminDropdown.js',        'u:dev:SeeMoreActivityButton/code.js',        'u:dev:PurgeButton/code.js',        'u:dev:MediaWiki:FindAndReplace/code.js',        'u:dev:FollowDropdown/code.js',        "u:dev:AjaxDelete/code.js",        "u:dev:CommentPreview/code.js",        'u:dev:FandomizedChat/library.js',        'u:dev:EditBio/code.js',        'u:dev:BlogLink/code.js',        'u:dev:RedirectManagement/code.js',    ] }); $(function {   if(mw.config.get("wgNamespaceNumber") == 2 & $(".UserProfileActionButton").length & $(".masthead-info hgroup").length) {        var actions = mw.config.get("wgWikiaPageActions");        var curAction;        $('.UserProfileActionButton').remove;        if(actions) {            importArticle({type: 'style', article: 'u:dev:MediaWiki:ModernProfile/EditButton.css'});            var button = ' ';            curAction = actions.filter(function(action){return action.id === "page:Edit"})[0];            if(curAction) button += '  '+curAction.caption+' '; else return; button += '  '; curAction = actions.filter(function(action){return action.id === "page:History"})[0]; if(curAction) button += ''+curAction.caption+''; curAction = actions.filter(function(action){return action.id === "page:Move"})[0]; if(curAction) button += ''+curAction.caption+'</a></li>'; curAction = actions.filter(function(action){return action.id === "page:Protect"})[0]; if(curAction) button += ''+curAction.caption+'</a></li>'; curAction = actions.filter(function(action){return action.id === "page:Delete"})[0]; if(curAction) button += ''+curAction.caption+'</a></li>'; button += '</ul>  '; $(button).appendTo(".masthead-info hgroup").css({float: "right"}); }   } });

WHAMDelay = 1000;

//__NOWYSIWYG__

window.DisplayClockJS = { offset: 180, format: '%2H:%2M:%2S %d %b %Y (CST)', };

if (mwCustomEditButtons.length) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://pixelgun.wikia.com/Special:FilePath/RedirectButton.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT [" + "[", "tagClose": "]]", "sampleText": "Insert text" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://pixelgun.wikia.com/Special:FilePath/Strike-ThroughButton.png", "speedTip": "Strike", "tagOpen": " ", "tagClose": " ", "sampleText": "Strike-through text" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://pixelgun.wikia.com/Special:FilePath/LineBreakButton.png", "speedTip": "Line break", "tagOpen": " ", "tagClose": "", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://pixelgun.wikia.com/Special:FilePath/CommentsButton.png", "speedTip": "Comment visible only for editors", "tagOpen": "", "sampleText": "Insert comment here" }; }

require(['fosl.wds'], function (wds) {   $('.foo').append(wds.icon('pencil')); });

require(['fosl.wds'], function (wds) {   $('.foo').append(wds.icon('trash', ['garbage'], 16)); });

require(['fosl.wds'], function (wds) {   $('.foo').html(' ...<svg class="wds-icon not-loaded" data-name="pencil" viewBox="0 0 24 24"> ');    wds.render('.foo'); });

if ( !document.getElementById( 'ca-randomwiki' ) ) { if ( skin === 'oasis' || skin === 'wikia' ) { $( '<ul id="ca-randomwiki">Random wiki</a></li>' ).appendTo( '.mcf-card-related-wikis__header' ); } else { $( '<li id="ca-randomwiki">Random wiki</a></li>' ).appendTo( '#p-wikicities-nav > .pBody > ul' ); }	}

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

importScriptPage('MediaWiki:Nuke/code.js', 'dev');

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

importScriptPage('MediaWiki:AjaxUndo/code.js', 'dev');

// Random Page in Category

$(function{   function createButton(text, page) {        return $('', { href: mw.util.wikiGetlink(page), title: text, 'class': 'wds-button wds-is-squished wds-is-secondary' }).text(text);   }    $('.page-header__contribution-buttons').append;        createButton('Random Page In This Category', 'Special:RandomInCategory/'),        createButton('Layout Guide', 'Layout Guide:'); });

/* jshint browser:true jquery:true laxbreak:true smarttabs:true */ /* global mediaWiki */ (function(window, $, mw) {   'use strict';    var config = mw.config.get([ 'skin', 'wgAction', 'wgNamespaceNumber', 'wgTitle', 'wgUserGroups', 'wgUserName' ]);   if (config.wgNamespaceNumber === 1202) {        $('#ca-talk').remove;        return;    } else if ( config.wgTitle.indexOf('/') !== -1 || config.wgNamespaceNumber !== 1200 || !(           config.wgUserName === config.wgTitle ||            /sysop|staff|threadmoderator/.test(config.wgUserGroups.join(' '))        ) || config.wgAction !== 'edit' || window.WallGreetingButtonLoaded ) {       return;    }    window.WallGreetingButtonLoaded = true;    function createOasis(params) {        $('#WikiaMainContentContainer').prepend(window.Mustache.render(            ' ' +                ' ' +                    '' +                        '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" class="wds-icon wds-icon-small" id="wds-icons-pencil-small">' +                            '<path d="M9.1 4.5l-7.8 7.8c-.2.2-.3.4-.3.7v3c0 .6.4 1 1 1h3c.3 0 .5-.1.7-.3l7.8-7.8-4.4-4.4zm7.6-.2l-3-3c-.4-.4-1-.4-1.4 0l-1.8 1.8 4.4 4.4 1.8-1.8c.4-.4.4-1 0-1.4z" fill-rule="evenodd"> ' +                        ' ' +                        '  ' +                    '</a>' +                    ' ' +                        '<div class="wds-button wds-is-squished wds-dropdown__toggle">' + '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" class="wds-icon wds-icon-tiny wds-dropdown__toggle-chevron" id="wds-icons-dropdown-tiny">' + '<path d="M6 9l4-5H2" fill-rule="evenodd"> ' + ' ' +                       ' ' +                        '<div class="wds-dropdown__content wds-is-not-scrollable" style="z-index: 2;">' + '<ul class="wds-list wds-is-linked">' + '</a></li>' + '</a></li>' + '</ul>' + ' ' +                   ' ' +                ' ' +            ' ',            params ));   }    function createMonobook(url, msg) { $('#ca-edit > a').prop('href', url + '?action=edit').text(msg); }   function init(i18n) { i18n.useUserLang; var messages = {}; ['editGreeting', 'history', 'wallHistory'].forEach(function(el) {           messages[el] = i18n.msg(el).plain;        }); if (config.skin === 'oasis') { createOasis($.extend(messages, { url: new mw.Title(config.wgTitle, 1202).getUrl, wallUrl: new mw.Title(config.wgTitle, 1200).getUrl }));       } else { createMonobook(new mw.Title(config.wgTitle, 1202).getUrl, messages.editGreeting); }   }    importArticle({        type: 'script',        article: 'u:dev:MediaWiki:I18n-js/code.js'    }); mw.hook('dev.i18n').add(function(i18no) {       $.when( i18no.loadMessages('WallGreetingButton'), mw.loader.load(['mediawiki.Title', 'wikia.mustache']) ).then(init);   }); })(window, jQuery, mediaWiki);