User:קיין ומוויסנדיק פּרעפֿערענצן/global.js

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

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.
/**mw.loader.load("// rand/WikidataInfo.js&action=raw&ctype=text/javascript");


//$.when($.ready,mw.loader.using('mediawiki.util')).then(function() { mw.util.addPortletLink('p-cactions', mw.util.getUrl(null, { action: 'purge' }), 'purge', 'ca-purge', 'Purge the internal cache for this page'); });

$.when($.ready,mw.loader.using('mediawiki.util')).then(function() { 
    var my_language = "en"
    var my_qid = mw.config.get('wgWikibaseItemId'); // replacing wgPageName
if (my_qid)
	    var my_short_url = "" + my_language + "&q=" + my_qid + "&live";
    var my_short_name = "reasonator:" + my_qid;

$.when(mw.loader.using([ 'mediawiki.util' ]), $.ready).then(function() { 
	const wgArticleId = mw.config.get('wgArticleId');
	if (wgArticleId){
		mw.util.addPortletLink("p-tb", "/?curid=" + wgArticleId, "Short url", "t-curid", "Reference using its article id");