User:AoV2/prefix.js

function prefix{ if(document.getElementById("ca-prefix") || wgNamespaceNumber == -1) return; a = document.getElementById("ca-watch"); if(!a) a = document.getElementById("ca-unwatch"); p = encodeURIComponent(mw.config.get('wgPageName')).replace(/\%2F/gi, "/"); mw.util.addPortletLink("p-cactions", wgArticlePath.replace("$1", "Special:Prefixindex/") + p,		"prefix", "ca-prefix", null, null, a.nextSibling ); }

addOnloadHook(prefix);