Jump to content

User:Schnellbehalter/global.js

From Meta, a Wikimedia project coordination wiki

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// copied from http://de.wikipedia.org/wiki/Benutzer:Olliminatore/monobook.js and modified
function importPage(page, lang, proj) { // all languages support
  name='User:'; // international name, works in all wikipedias
  if(!lang) lang = wgContentLanguage;
  if(!proj) proj = 'wikipedia';
  // new version
  page = 'http://' + lang + '.' + proj + '.org' + wgScriptPath + '/index.php?title=' + name + page +
          '&action=raw&ctype=text/javascript&smaxage=2678400&dontcountme=s';
  lang = document.createElement('script');
  lang.setAttribute('type', 'text/javascript');
  lang.setAttribute('src', page);
  lang.setAttribute('charset', 'utf-8');
  document.getElementsByTagName('head')[0].appendChild(lang);
  return false;
}

// install [[:en:user:Cacycle/wikEdDiff]] enhanced diff view using ajax
importPage('Cacycle/wikEdDiff.js', 'en');

// remove spam addon
importPage('Mike.lifeguard/removeSpam.js', 'meta', 'wikimedia');