User:Timsheridan/monobook.js

Source: Wikipedia, the free encyclopedia.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// [[User:Lupin/popups.js]] - please include this line 

mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
  mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); }

// include comfortable javascript editor by cacycle

// levels of undo (each level holds the whole text)
undoBufferMax = 20;

// style for preview box
stylePreviewBox = 'background-color: #f9f9f9;';

// style for custom edit buttons
styleButtons = 'font-size: smaller; padding-left: 0.1em; padding-right: 0.1em';

// presets for input field dropdown options
findHistoryLength = 10;

// preset for combo box select options
presetOptions = [];
presetOptions['summary'] = [
  'Copyedit',
  'Linkfix',
  'Reverting vandalism',
  'Formatting source text'
];

// expiration time span for history cookies in seconds
cookieExpireSec = (365 * 24 * 60 * 60);

// enable cursor horizontal position memory
cursorMemory = true;

// show at least this number of lines ahead of cursor movement
scrollMargin = 1;

// show at least this number of lines ahead of cursor movement for
findMargin = 2;

// find ahead checkbox selected by default
findAheadSelected = true;

// css for diff view elements
styleDelete = 'font-weight: none; text-decoration: none; color: #ffffff; background-color: #990033;';
styleInsert = 'font-weight: none; text-decoration: none; color: #ffffff; background-color: #009933;';
styleMoved  = 'font-weight: bold; vertical-align: text-bottom; font-size: xx-small; padding: 0; border: solid 1px';
styleColor  = styleDiffColor  || [
  'background-color: #ffff44;',
  'background-color: #b0ff90;',
  'background-color: #ffcc99;',
  'background-color: #99ffff;',
  'background-color: #99ccff;',
  'background-color: #cc99ff;',
  'background-color: #ff99cc;',
  'background-color: #ffd040;',
  'background-color: #d0d0d0;'
];

// html for block move indicators, {block} is replaced by the block number
htmlMovedRight = '<input type="button" value=">" class="diffMoved{block}">';
htmlMovedLeft  = '<input type="button" value="<" class="diffMoved{block}">';
htmlBlockStart = '<span class="diffBlock{block}">';
htmlBlockEnd   = '</span>';

// minimal number of real words for a moved block (0 for always displaying block move indicators)
blockMinLength = 3;

// exclude identical sequence starts and endings from highlighting of changed text
wordDiff = true;

// enable recursive diff to resolve problematic sequences
recursiveDiff = true;

// show block moves
showBlockMoves = true;

// html tag to be used for insertions (ins or span)
insTag = 'span';

// html tag to be used for deletions (del or span)
delTag = 'span';

// install [[User:Cacycle/diff]] text diff code
document.write('<script type="text/javascript" src="' 
  + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/diff.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// install [[User:Pilaf/Live_Preview]] page preview tool
document.write('<script type="text/javascript" src="' 
  + 'http://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// install [[User:Cacycle/editor]] edit tool
document.write('<script type="text/javascript" src="' 
  + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/editor.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');