User:Fenakhay/extraCategoryLinks.js

Note – after saving, you may have to bypass your browser’s cache to see the changes.

  • Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh);
  • Konqueror and Chrome: click Reload or press F5;
  • Opera: clear the cache in Tools → Preferences;
  • Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.

if (mw.config.get("wgNamespaceNumber") === 14) {
	$("div#mw-pages").find("li").append(function() {
		var title = $(this).find("a").attr("title"),
			$links = $("<span>").attr("class", "mw-whatlinkshere-tools")
				.attr("style", "font-size:.8em;padding-left:1em;"),
			$edit = $("<a>").attr("href", "/w/index.php?title=" + title + "&action=edit")
				.attr("title", title)
				.text("← edit");
			$history = $("<a>").attr("href", "/w/index.php?title=" + title + "&action=history")
				.attr("title", title)
				.text("history");
			$delete = $("<a>").attr("href", "/w/index.php?title=" + title + "&action=delete")
				.attr("title", title)
				.text("delete");
			$hard_purge = $("<a>").attr("href", "/w/index.php?title=" + title + "&action=purge&forcelinkupdate=1")
				.attr("title", title)
				.text("hard purge");
		$links.append(" &lrm;(").append($edit).append(" | ").append($history).append(" | ").append($delete).append(" | ").append($hard_purge).append(")");
		return $links;
	});
}