User:NguoiDungKhongDinhDanh/ShowRevisionID.js

/* Show Revision ID */

// Shows the revision id on history and Special pages // Documentation at User:BrandonXLF/ShowRevisionID // Originally by User:BrandonXLF.

$(function {	mw.hook('wikipage.content').add(function { if (mw.config.get('wgAction') !== 'history' && mw.config.get('wgNamespaceNumber') !== -1) { return; }		const items = $('li[data-mw-revid]').not('.with-revid'); for (let i = 0; i < items.length; i++) { const separator = document.createElement('span'); separator.textContent = ' | '; separator.style.userSelect = 'none'; items[i].classList.add('with-revid'); items[i].getElementsByClassName('mw-changeslist-date')[0].append(				separator,				document.createTextNode(items[i].getAttribute('data-mw-revid'))			); }	}); });