Jump to content

User:Bradv/Scripts/WhatLinksHereSnippets

From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by Qwerfjkl (bot) (talk | contribs) at 14:48, 8 May 2022 (→‎Usage: Replaced deprecated <source> tags with <syntaxhighlight>). The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
WhatLinksHereSnippets
Author(s)bradv🍁
StatusStable
First releasedNovember 30, 2020; 3 years ago (2020-11-30)
Browser supportAll modern browsers
Skin supportVector
SourceUser:Bradv/Scripts/WhatLinksHereSnippets.js

WhatLinksHereSnippets.js allows for an editor to see "snippets" of code for transcluded templates in order to see how they are being used.

Usage

[edit]

To use the script, add the following to your skin-specific Javascript file.

importScript('User:Bradv/Scripts/WhatLinksHereSnippets.js'); // Backlink: [[User:Bradv/Scripts/WhatLinksHereSnippets.js]]

Once installed, a right-aligned "Show snippets" button will appear on the WhatLinksHere display. By clicking that button, any transclusions will be expanded, with the template use highlighted.

"Snow snippets" button, display collapsed "Hide snippets" button, display expanded