User:PrimeHunter/External links.js

/* This script adds "External links" below "What links here" in the sidebar. It shows a list of up to 500 external links in the current page. To use the script, add the following line to Special:MyPage/common.js: importScript('User:PrimeHunter/External links.js'); // Linkback: User:PrimeHunter/External links.js



mw.loader.using(['mediawiki.util'], function {  mw.util.addPortletLink( 'p-tb', 'https://en.wikipedia.org/w/api.php?action=query&prop=extlinks&ellimit=500&format=json&titles=' + encodeURIComponent(mw.config.get( 'wgPageName' )), 'External links', 'pt-externallinks', 'List external links (max 500) in this page', null, '#t-recentchangeslinked' ); });