User:SuperDragonXD1/common.js

importScriptPage("User:SuperDragonXD1/common.js", "dev") importStylesheetPage("User:SuperDragonXD1/common.css", "dev")

(function { if (mw.config.get("wgTitle") !== mw.config.get("wgUserName")) return;  var ui;

function init(lib) { ui = lib;

const moveItem = ui.li({     child: ui.a({ href: "/wiki/Special:MovePage/" + mw.config.get("wgPageName"), text: "Move" })   });    const deleteItem = ui.li({      child: ui.a({ href: "/wiki/" + mw.config.get("wgPageName") + "?action=delete", text: "Delete" })   });    const actions = $("#p-cactions .wds-list"); actions.append(moveItem); if (/sysop|staff|helper|wiki-representative|wiki-specialist|content-moderator|soap/.test(mw.config.get("wgUserGroups"))) { actions.append(deleteItem); }

}

importArticle({   type: 'script',    article: 'u:dev:MediaWiki:Dorui.js'  });

mw.hook('doru.ui').add(init); });

/* function replaceInText(element, pattern, replacement) { for (var node of element.childNodes) { switch (node.nodeType) { case Node.ELEMENT_NODE: replaceInText(node, pattern, replacement); break; case Node.TEXT_NODE: node.textContent = node.textContent.replace(pattern, replacement); break; case Node.DOCUMENT_NODE: replaceInText(node, pattern, replacement); }   } }

replaceInText(document.querySelector("html"), /Delete/g, "Obliterate"); replaceInText(document.querySelector("html"), /delete/g, "obliterate"); replaceInText(document.querySelector("html"), /deletion/g, "obliteration"); replaceInText(document.querySelector("html"), /deleting/g, "obliterating") replaceInText(document.querySelector("html"), /Deletion/g, "Obliteration") replaceInText(document.querySelector("html"), /Deleting/g, "Obliterating")