Jump to content

User:Krinkle/Tools/WhatLeavesHere

From Meta, a Wikimedia project coordination wiki

What leaves here is a gadget that lists the outgoing links of a page (such as page links, image links, external links, categories and transclusions). The list can be filtered by namespace. The data is shown on a Special page, which you can access via a link in the Toolbox sidebar. It is the opposite of the "What links here" feature in MediaWiki.

Install

[edit]
  • Paste this code in common.js on your local wiki, or in global.js on Meta to use it everywhere you go:
// [[File:Krinkle_WhatLeavesHere.js]]
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Krinkle/Tools/WhatLeavesHere.js&action=raw&ctype=text/javascript');
The [[File:Krinkle_WhatLeavesHere.js]] code is used for statistics (optional).
  • Now browse to an article and click "What leaves here" in the toolbox.
  • Done :-)

If you encounter any issues, please let me know!

Feedback

[edit]

If you experience any issues or have suggestions for how something could be better, let me know by filing an issue.

Install as Gadget

[edit]

(These instructions are for sysops who can edit in the MediaWiki:-namespace)

  • Copy the the Install snippet to your wiki's MediaWiki:Gadget-WhatLeavesHere.js (just like when you would install it in your user script)
  • Create MediaWiki:Gadget-WhatLeavesHere with something like the following:
''What leaves here'': A special page for extracting all links from the current page. Accessible from the Toolbox.
  • Then add a line in MediaWiki:Gadgets-definition somewhere with:
    * WhatLeavesHere[ResourceLoader]|WhatLeavesHere.js

See also

[edit]