User:Wikisaurus/common.js

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( '//www.wikidata.org/w/index.php?title=User:Mat%C4%9Bj_Such%C3%A1nek/moveClaim.js&action=raw&ctype=text/javascript' ); // [[User:Matěj Suchánek/moveClaim.js]]

// Ссылки вверху страницы
function addLink(name, page, pos){
	var a = document.createElement('a');
	a.href = page;
	a.appendChild(document.createTextNode(name));

	var span = document.createElement('span');
	span.className = 'purgelink !important';
	span.appendChild(a);
	
	var li = document.createElement('li');
	li.appendChild(span);

	var ul = $('#p-personal ul')[0];
	ul.insertBefore(li, ul.children[pos]);
}

$(document).ready(function(){
	addLink('Для проверки', 'https://www.wikidata.org/wiki/User:Wikisaurus/check', 5);
})