Jump to content

User:Nardog/CopySectLink

From Wikipedia, the free encyclopedia
CopySectLink
DescriptionAdds a button to copy the unencoded page title or section path next to each heading
UpdatedAugust 4, 2024
    (3 months ago)
BrowsersChrome, Firefox, etc.
SourceUser:Nardog/CopySectLink.js

This script adds a button that copies the unencoded page title (with spaces, not underscores) or section path (with #) to your clipboard so it can be pasted as a clean wikilink, next to the [edit] link in each heading. If the edit link doesn't exist, it creates its own brackets. You may also copy the full URL by right-clicking the button and selecting your browser's native "Copy link" option.

Installation

[edit]

Add the following to your common.js or global.js:

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/CopySectLink.js&action=raw&ctype=text/javascript');

Or you may enable the script installer in Preferences → Gadgets and click "Install" in the infobox on this page.