Saltar para o conteúdo

Usuário(a):Mathglot/ShowRevisionID.js

Origem: Wikipédia, a enciclopédia livre.

Nota: Depois de publicar, poderá ter de contornar a cache do seu navegador para ver as alterações.

  • Firefox / Safari: Pressione Shift enquanto clica Recarregar, ou pressione Ctrl-F5 ou Ctrl-R (⌘-R no Mac)
  • Google Chrome: Pressione Ctrl-Shift-R (⌘-Shift-R no Mac)
  • Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5.
/*** Show Revision ID - copied from [[:en:User:BrandonXLF/ShowRevisionID.js]] ***/

// Shows the revison id on history pages
// Documentation at [[User:BrandonXLF/ShowRevisionID]]
// By [[User:BrandonXLF]].  Add this line to common.js :
// importScript('User:Mathglot/ShowRevisionID.js'); // [[:en:User:BrandonXLF/ShowRevisionID.js]]

$(function(){
	if (location.search.includes('action=history') || location.href.includes('Special:Watchlist') || location.href.includes('Special:Contributions')) {
		var items = document.querySelectorAll('li[data-mw-revid]');
		for (var i = 0; i < items.length; i++) {
			items[i].getElementsByClassName('mw-changeslist-date')[0].appendChild(document.createTextNode(' | ' + items[i].getAttribute('data-mw-revid')));
		}
	}
});