User:Acagastya/hideDelLog.js

(function hideDelLog { if (mw.config.get('wgNamespaceNumber') != -1) return; // only for RC  const div = [...document.getElementsByClassName('mw-changeslist')][0];  const input = document.createElement('input');  input.setAttribute('type', 'checkbox');  input.setAttribute('id', 'hide-rc-deletion-log');  input.setAttribute('name', 'hide-rc-deletion-log');  const label = document.createElement('label');  label.setAttribute('for', 'hide-rc-deletion-log');  label.innerText = 'DelLog';  input.setAttribute( 'onchange', `this.checked ? sheet.addRule('li[data-mw-logaction="delete/delete"]', 'display: none') : sheet.removeRule` ); div.parentElement.prepend(label);  div.parentElement.prepend(input); });