User:ԱշոտՏՆՂ/global.js

From Meta, a Wikimedia project coordination wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.
document.addEventListener('keydown', e => {
  if (e.ctrlKey && e.shiftKey && e.code === 'KeyC') {
    e.preventDefault();
    document.getElementById('t-page-catSuggest').click();
  }
  if (e.ctrlKey && e.shiftKey && e.code === 'KeyZ') {
	e.preventDefault();
	const potentials = document.getElementsByClassName('catSuggest-potential');
	for(let i = 0; i < potentials.length; i++) {
	    potentials[i].click();
	}
	document.getElementById('catSuggest-save').click();
  }
  if (e.ctrlKey && e.shiftKey && e.code === 'KeyS') {
	e.preventDefault();
	document.getElementById('catSuggest-save').click();
  }
  if (e.ctrlKey && e.shiftKey && e.code === 'KeyA') {
	e.preventDefault();
	const potentials = document.getElementsByClassName('catSuggest-potential');
	for(let i = 0; i < potentials.length; i++) {
	    potentials[i].click();
	}
  }
});

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Js/ajaxPreview.js&action=raw&ctype=text/javascript');
window.articleTranslatorConf = {
    'homeWiki': 'hy'
};
$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () { 
   var iHaveBotIn = ['hy.wikipedia.org', 'hy.wiktionary.org', 'hy.wikiquote.org', 'hyw.wikipedia.org', 'www.wikidata.org'];
   if ( iHaveBotIn.includes(mw.config.get('wgServerName')) ) { 
      mw.util.addPortletLink( 'p-personal', mw.util.getUrl( 'Special:Contributions/ԱշբոտՏՆՂ' ), 'Բոտի ներդրում', 'pt-mybotcontris', 'Տեսնել բոտի ներդրումները', 'o', '#pt-mycontris' );
   }
} );
/* 
mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Ebraminio/ArticleTranslator.js&action=raw&ctype=text/javascript");
function sortinter(x) {
    for (var i = x.length-1; i >=0; i--) {
        $("#p-lang .body ul li:eq(0)").before($(".interwiki-" + x[i]).show());
		
    }
}
setTimeout(function(){
	if(mw.iwList && mw.iwList.constructor == Array) {
		sortinter(mw.iwList);
	} else {
		sortinter(['hy', 'hyw', 'en', 'ru', 'simple', 'de']);
	}
}, 1500);
*/
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:ԱշոտՏՆՂ/hide-vector-sidebar.js&action=raw&ctype=text/javascript');

mw.loader.load('http://localhost:28008/dev.js?n=2');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:ԱշոտՏՆՂ/catSuggest.js&action=raw&ctype=text/javascript');
//* by [[User:Ianezz]] ([[Commons:Village_pump/Archive/2009Sep#CSS_placement_of_categories]]), based on [[:wikinews:Help:User_style#Moving_categories_to_top]]
$(function () {
	if (mw.config.get('wgNamespaceNumber') !== -1) {
		var bc = document.getElementById('bodyContent') || document.getElementById('mw-content-text');
		var catlinks = document.getElementById('catlinks');
		// Note no catlinks on mobile Minerva skin
		if (bc && catlinks) bc.insertBefore(catlinks, bc.childNodes[0]);
	}
});
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jon_Harald_Søby/diffedit.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript' );