User:Fatcatzzzzz/common.js

jQuery(document).ready(function {    "use strict";    var Highlighter = {        highlight: function  {            require(["WikiTextSyntaxHighlighter"], function (syntaxHighlight) { var textarea = jQuery("#wpTextbox1")[0]; var config = { boldOrItalicColor: "#e4e5f3", commentColor: "#f8dbda", entityColor: "#e8ebda", externalLinkColor: "#dbeceb", headingColor: "#e4e5f3", hrColor: "#e4e5f3", listOrIndentColor: "#f8dbda", parameterColor: "#f5e0d8", signatureColor: "#f5e0d8", tagColor: "#f6dde9", tableColor: "#f0ebdb", templateColor: "#ab0007", wikilinkColor: "#d9eaf6" };               syntaxHighlight.init(textarea, config); });       },        init: function  {            var $config = mw.config.get([ "wgAction", "wgExtensionsPath" ]);           if ( jQuery.inArray($config.wgAction, ["edit", "submit"]) === -1 || window.isHighlighterLoaded ) {               return;            }            window.isHighlighterLoaded = true;            var $resources = [                $config.wgExtensionsPath + "/wikia/EditPageLayout/js/plugins/WikitextSyntaxHighlighter.js",                jQuery.getSassCommonURL("extensions/wikia/EditPageLayout/css/core/syntaxhighlighting.scss")            ];            jQuery.getResources($resources, Highlighter.highlight);        }    };    jQuery(Highlighter.init); });