User:PrimeHunter/Impact.js: Difference between revisions – Wikipedia

From Wikipedia, the free encyclopedia

Content deleted Content added


 

Line 1: Line 1:

/* This script adds a tools link saying “Impact” to [[Special:Impact/X]]

/* This script adds a tools link saying “Impact” to [[Special:Impact/X]]

when you are in the userspace of the user 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.

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]]:

To use the script, add the following line to [[Special:MyPage/common.js]]:


Latest revision as of 15:30, 18 November 2025

/* This script adds a tools link saying "Impact" to [[Special:Impact/X]]
   when you are in the userspace of the user X, e.g. [[Special:Impact/PrimeHunter]].
   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'
  );
});

Leave a Comment

Your email address will not be published. Required fields are marked *

Exit mobile version