Jump to content

User:Guarapiranga/WhatRedirectsHere.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.
/*** What Redirects Here ***/

// Adds link to [[Special:WhatLinksHere]] filtered to redirects
// By [[en:w:User:Guarapiranga]]

$(function() {
	mw.util.addPortletLink(
		'p-tb',
		'https://en.wikipedia.org/wiki/Special:WhatLinksHere?hidetrans=1&hidelinks=1&target='+encodeURIComponent(mw.config.get('wgPageName')),
		'What redirects here',
		'whatredirectshere',
		'Redirects to '+mw.config.get('wgPageName'),
		'',
		$('#pt-whatlinkshere').next()
	);
});