User:PrimeHunter/Impact.js
/* This script adds a tools link saying "Impact" to Special:Impact/X
when you are in the userspace of the user X.
IP's don't have impact pages but the script makes a broken link for them.
To use the script, add the following line to Special:MyPage/common.js:
importScript('User:PrimeHunter/Impact.js'); // Linkback: User:PrimeHunter/Impact.js
- /
$( document ).ready( function() {
if (mw.config.get('wgNamespaceNumber') != "2" && mw.config.get('wgNamespaceNumber') != "3")
return; // restrict to User and User talk
mw.util.addPortletLink(
'p-tb',
mw.util.getUrl( 'Special:Impact/' ) + mw.config.get('wgRelevantUserName'),
'Impact',
't-impact',
'Show subpages of the current page',
null,
'#t-info'
);
});