Content deleted Content added
Polygnotus (talk | contribs) No edit summary |
Polygnotus (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2:
(function() {
function addLinkIcons() {
if (mw.config.get('wgIsMainPage')) {
return;
}
const headers = document.querySelectorAll('h2[id]');
headers.forEach(header => {
// Skip the table of contents heading
if (header.id === 'mw-toc-heading') {
return;
}
const isCurrentVersion = !window.___location.search.match(/[?&]oldid=(\d+)/) && !document.querySelector('.diff-currentversion-title');
Line 13 ⟶ 23:
} else {
// Add single icon for old revision or diff
addIcon(header, '&#
}
});
|