User:©TriMoon™/global.js

/** * WikEd */ switch(mw.config.get('wgDBname')){ // Selective disable case "shopheroes": break; default: // install wikipedia:User:Cacycle/wikEd in-browser text editor importScriptURI("https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Cacycle/wikEd.js");

// Change the presets of the toggle buttons in the wikEd control bar: var wikEdConfig = { 'useWikEdPreset': true, 'highlightSyntaxPreset': false, 'closeToolbarPreset': false, // Display a button to automatically append "…using wikEd" (or another text) to the edit summaries: 'showUsingButton': true, 'usingPreset': true, 'summaryUsing': '', // 'summaryUsing': 'Dropping A-Bom on Charitwo's head. come fucking change this!', 'refHidePreset': false, 'diffPreset': false, 'fullScreenModePreset': false, // Change the history lengths: 'historyLength': { 'find': 15, 'replace': 15, 'summary': 20 } };

// Disable ctrl-clickable followable links in edit text: //var wikEdFollowLinks = false;

// Add your own summary presets: wikEdConfig.comboPresetOptions = {}; wikEdConfig.comboPresetOptions.summary = [ 'Initial Setup', 'Moving into sub-tree', 'Layout editorial', 'Added Category', 'Changed Category', 'Linkified words', 'my reply', 'linkfix', 'fixing typos', 'removing linkspam', 'reverting test', 'reverting vandalism', 'Code-Cleanup', 'Code-Fixup', 'formatting source text', 'Copy-over from w:c:templates', 'Updated to latest version on w:c:templates', '{wikEdUsing}' ];

/* My addition to enable per-site config changes */ if( typeof(wikEdConfigSite) == 'undefined' ){ var wikEdConfigSite = {}; wikEdConfigSite["wikicities"] = true; } /* per site use: * if( typeof(wikEdConfigSite[wgDBname]) == 'undefined' ){ wikEdConfigSite[wgDBname] = true; wikEdConfig.comboPresetOptions.summary.push("--new text--"); }
 * per site use: */

/* My addition to enable per-site config changes */ } /** * /WikEd */

/** * Wikipedia:Tools/Navigation popups * https://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups#Installation_on_remote_MediaWiki_installations,_or_via_your_global.js */ switch(mw.config.get('wgDBname')){ // Selective disable case "shopheroes": break; default: // wikipedia:Wikipedia:Tools/Navigation_popups mw.loader.load('https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups'); window.popupStructure='menus'; window.popupDelay=1.5; window.popupPreviewKillTemplates=false; } /** * /Wikipedia:Tools/Navigation popups */

/** * Combined scripts */ //	CFG-LinkPreview window.pPreview = $.extend(true, window.pPreview, {RegExp: (window.pPreview || {}).RegExp || {} }); //	/CFG-LinkPreview (function (module, mw, $, undefined) {	'use strict';

var toLoadJS, toLoadCSS, util; // module.debug = true;

function addToArray(aArray,key){ if (!key) return; if (Array.isArray(key)) { key.forEach(				function(uri) {					aArray.push(uri);				}			); } else { aArray.push(key); }	}

// Declare the modules we want to load module.modules = { 'PurgeButton': { home:	'https://dev.wikia.com/wiki/Purgetab', js:	'u:dev:MediaWiki:PurgeButton/code.js', },		'View Source': { home:	'https://dev.wikia.com/wiki/View_Source', js:	'u:dev:MediaWiki:View Source/code.js', },		'LastEdited': { home:	'https://dev.wikia.com/wiki/LastEdited', js:	'u:dev:MediaWiki:LastEdited/code.js', },		'TabViewEditLinks': { home:	'https://dev.wikia.com/wiki/TabViewEditLinks', js:	'u:dev:MediaWiki:TabViewEditLinks/code.js', },		'LinkPreview': { home:	'https://dev.wikia.com/wiki/LinkPreview', js:	'u:dev:MediaWiki:LinkPreview/code.js', },		'BotoneraPopups': { home:	'https://dev.wikia.com/wiki/BotoneraPopups', js:	[ 'u:dev:MediaWiki:BotoneraPopups/BotoneraPopups.js', 'u:dev:MediaWiki:BotoneraPopups/WikiArticle.js', 'u:dev:MediaWiki:BotoneraPopups/UILang/en.js', 'u:dev:MediaWiki:BotoneraPopups/code.js', ]		},	};	module.debug && console.debug('Setup', Object.assign(module.modules));

// Selective remove per wiki switch (mw.config.get('wgDBname')) { case 'shopheroes': delete module.modules['PurgeButton']; break; default: delete module.modules['BotoneraPopups']; break; }	module.debug && console.debug('Filtered', Object.assign(module.modules));

// Create the final array's to load toLoadJS = new Array; toLoadCSS = new Array; for (util in module.modules ) { // Homepages module.modules[util].home = new URL(module.modules[util].home); // Javascripts addToArray(toLoadJS, module.modules[util].js); // CSS-Stylesheets addToArray(toLoadCSS, module.modules[util].css); }	module.debug && console.debug('toLoadJS', toLoadJS); module.debug && console.debug('toLoadCSS', toLoadCSS);

// Actual perform loading importArticles(		{	type: 'script',	articles: toLoadJS	},		{	type: 'style',		articles: toLoadCSS	}	);

}(window.myGlobalJS = window.myGlobalJS || {}, mediaWiki, jQuery)); /** * /Combined scripts */