User:©TriMoon™/common.js

From Salem Wiki
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
//<syntaxhighlight lang="javascript"><pre>
/**********
 WikEd
**********/
// install [[wikipedia:User:Cacycle/wikEd]] in-browser text editor
importScriptURI("http://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 [[w: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',
  '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[wgDB]) == 'undefined' ){
  wikEdConfigSite[wgDB] = true;
  wikEdConfig.comboPresetOptions.summary.push("--new text--");
}
* per site use: */

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


/**********
 WikiSwitch
**********/
// http://dev.wikia.com/wiki/WikiSwitch
importScriptPage( 'WikiSwitch/code.js', 'dev' );
wikiaDomainList = new Array(
{ id: 'central', domain: 'www.wikia.com', name: 'Central', title: 'Central Wikia', interwiki: 'w:' },
{ id: 'templates', domain: 'templates.wikia.com', name: 'Templates', title: 'Templates Wikia', interwiki: 'w:c:templates:' },
{ id: 'scratchpad', domain: 'scratchpad.wikia.com', name: 'ScratchPad', title: 'ScratchPad Wikia', interwiki: 'scratchpad:' },
{ id: 'uwo', domain: 'unchartedwaters.wikia.com', name: 'UnchartedWaters', title: 'UnchartedWaters Wikia', interwiki: 'w:c:unchartedwaters:' }
);
var addWikiSwitchMenu = true;//Adds the wikiswitch menu.
var addUserSwitchMenu = true;//Adds a wikiswitch for your userpages.
var addTalkSwitchMenu = true;//Adds a wikiswitch for your usertalkpages.
var addWikiSwitchPageClone = true;//Adds a Clone button to wikiswitch tabs.
var addWikiSwitchPageDiff = true;//Adds a Diff button to wikiswitch tabs.
/**********
/WikiSwitch
**********/

/**********
 Wikipedia:Tools/Navigation popups
**********/
// [[wikipedia:User:Lupin/popups]]
importScriptURI("http://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Lupin/popups.js");
popupStructure='menus';
popupDelay=1.5;
popupPreviewKillTemplates=false;
/**********
/Wikipedia:Tools/Navigation popups
**********/

// [[w:c:dev:Purgetab]]
importScriptPage('Purgetab/code.js', 'dev');

// [[w:c:dev:SkinSwitchButton]]
importScriptPage('SkinSwitchButton/code.js', 'dev');

if( typeof(wikEdConfigSite[wgDB]) == 'undefined' ){
wikEdConfigSite[wgDB] = true;
wikEdConfig.comboPresetOptions.summary.push("Updated to template version with info from ingame");
}
//</pre></syntaxhighlight>