User:Acagastya/addDelLinks.js

(function addDelLinks { // 0. Check namespace  if (mw.config.get('wgNamespaceNumber') != -1) return;  const selectedLinks = [    ...document.getElementsByClassName('mw-changeslist-title'),  ];  const titles = selectedLinks.map((el) => el.innerHTML);  const selectedLis = selectedLinks.map( (el) => el.parentElement.parentElement.parentElement.children[1].children[0] ); selectedLis.forEach((el, idx) => { const span = document.createElement('span'); span.innerHTML = `del`; el.appendChild(span); }); });