User:Ebrahim/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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// disable error logging for privacy reasons
mw.loader.using('mediawiki.storage').then(function () {
	mw.storage.session.set('client-error-opt-out', 1);
});

if (mw.config.get('wgContentLanguage') !== 'fa') {
	window.articleTranslatorConf = {
		homeWiki: 'fa',
		fromLang: mw.config.get('wgContentLanguage')
	};
	mw.loader.load("https://en.wikipedia.org/w/index.php?title=User:Ebrahim/ArticleTranslator.js&action=raw&ctype=text/javascript");
}

if (mw.config.get('wgCanonicalSpecialPageName') === 'Whatlinkshere') {
	mw.loader.load('https://www.wikidata.org/w/index.php?title=MediaWiki:Linkscount.js&action=raw&ctype=text/javascript');
}

$(function () {
	mw.util.addPortletLink('p-tb', 'https://wdvd.toolforge.org/index.php?lang=fa&description=on&labels=on&sitelinks=on', 'Wikidata Vandalism');
	mw.util.addPortletLink('p-tb', 'https://global-search.toolforge.org/?q=hookEvent%5C%28&regex=1&namespaces=&title=', 'Global Search');
	mw.util.addPortletLink('p-tb', 'https://notwikilambda.toolforge.org/', 'notwikilambda');
});