Jump to content

User:PrimeHunter/AllPages.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* This script adds a tools link saying "AllPages".
   It goes to [[Special:AllPages]] starting from the current page.
   To use the script, add the following line to [[Special:MyPage/common.js]]:
 
importScript('User:PrimeHunter/AllPages.js'); // Linkback: [[User:PrimeHunter/AllPages.js]]
 
*/
 
$( document ).ready( function() {
  mw.util.addPortletLink(
    'p-tb',
    mw.util.getUrl( 'Special:AllPages' ) + '?from=' + mw.config.get('wgPageName'),
    'AllPages',
    't-allpages',
    'Show Special:AllPages starting from this page',
    null,
    '#t-info'
  );
});