User:Shahadat/CopySectLink

From Justapedia, unleashing the power of collective wisdom
Jump to navigation Jump to search
CopySectLink
DescriptionAdds a button to copy the unencoded page title or section path next to each heading
UpdatedSeptember 15, 2023
    (10 months ago)
Browser supportChrome, Firefox, etc.
SourceUser:Shahadat/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

Add the following to your common.js :

mw.loader.load('//justapedia.org/w/index.php?title=User:Shahadat/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.

Script Attribution