User:PrimeHunter/Where links this.js
/* This script adds "Where links this" below "What links here" in the sidebar.
It shows an unlinked list of up to 500 pages linked from the current page.
To use the script, add the following line to Special:MyPage/common.js:
importScript('User:PrimeHunter/Where links this.js'); // Linkback: User:PrimeHunter/Where links this.js
- /
mw.loader.using(['mediawiki.util'], function () {
mw.util.addPortletLink(
'p-tb',
'https://en.wikipedia.org/w/api.php?action=query&prop=links&pllimit=500&format=xml&titles=' +
encodeURIComponent(mw.config.get( 'wgPageName' )),
'Where links this',
'pt-outlinks',
'What does this page link to',
null,
'#t-recentchangeslinked'
);
});