User:B1omman/common.js

From ArchWiki

Note: After publishing, 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: Press Ctrl-F5.
// install [[w:User:Cacycle/wikEdDiff]] enhanced diff
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js&action=raw&ctype=text/javascript');

// [[Wikipedia:Tools/Navigation popups]]
mw.loader.load('https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups');
// more info on https://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups
window.popupStructure = 'lite';

// customization of wikEdDiff interface: https://en.wikipedia.org/wiki/User:Cacycle/wikEdDiff#Customization
var wikEdDiffConfig; if (wikEdDiffConfig === undefined) { wikEdDiffConfig = {}; }

wikEdDiffConfig.coloredBlocks = true;
wikEdDiffConfig.fullDiff = true;
wikEdDiffConfig.showBlockMoves = true;
wikEdDiffConfig.charDiff = true;
wikEdDiffConfig.repeatedDiff = true;
wikEdDiffConfig.recursiveDiff = true;
wikEdDiffConfig.recursionMax = 5;
wikEdDiffConfig.unlinkBlocks = true;
wikEdDiffConfig.blockMinLength = 3;
wikEdDiffConfig.unlinkMax = 10;
wikEdDiffConfig.coloredBlocks = true;
wikEdDiffConfig.debug = false;
wikEdDiffConfig.timer = false;
wikEdDiffConfig.unitTesting = false;
wikEdDiffConfig.noUnicodeSymbols = false;
wikEdDiffConfig.stripTrailingNewline = true;


// hide the ordinary MediaWiki's diff
//$( "table.diff tr:has(td.diff-lineno, td.diff-marker)" ).css( "display", "none" );

// move category links to the top
var contentDivs = document.getElementsByClassName("mw-content-ltr");
if ( contentDivs.length == 0 ) {
  contentDivs = document.getElementsByClassName("mw-content-rtl");
}
if ( contentDivs.length > 0 ) {
  var contentDiv = contentDivs[0];
  var catlinks = document.getElementById("catlinks");
  if ( catlinks != null ) {
    contentDiv.parentNode.insertBefore(catlinks, contentDiv);
    catlinks.setAttribute("style", "margin-bottom: 1em;");
  }
}