User:Theknightwho/scripts/extraCategoryLinks.js

function addExtraCategoryLinks { var title = $(this).find("a").attr("title"), $links = $(" ").attr("class", "mw-whatlinkshere-tools") .attr("style", "font-size:.8em;padding-left:1em;") .attr("dir", "ltr"), $edit = $("").attr("href", "/w/index.php?title=" + title + "&action=edit") .attr("title", title) .text("← edit"); $history = $("").attr("href", "/w/index.php?title=" + title + "&action=history") .attr("title", title) .text("history"); $links.append(" (").append($edit).append(" | ").append($history).append(")"); return $links; }

if (mw.config.get("wgNamespaceNumber") === 14) { $("div#mw-subcategories").find("div.CategoryTreeItem").append(addExtraCategoryLinks); $("div#mw-pages").find("li").append(addExtraCategoryLinks); }