User:andrybak/Scripts/copy-section-link
Description | Simplifies creating links to sections |
---|---|
Author(s) | Enterprisey, The Earwig, andrybak |
First released | 2024-07-01 |
Updated | July 15, 2024 (3 months ago) |
Skins | Vector 2022, Vector (2010), MonoBook, Timeless, Modern, Minerva Neue (mobile) (partial) |
Source | User:Andrybak/Scripts/copy-section-link.js |
copy-section-link is a user script that adds a pilcrow (¶ symbol) to section headings that, when clicked, shows a popup with an appropriate wikilink and external link.
How to install
[edit]On English Wikipedia it is recommended to install this script using the script-installer gadget, which can be turned on at:
- Preferences → Gadgets → Advanced → Install scripts without having to manually edit JavaScript files (documentation) (direct link)
Then you can go back to this page and click the big blue "Install" button in the infobox.
To install the script on another wiki (including your global.js), use the following snippet:
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Andrybak/Scripts/copy-section-link.js&action=raw&ctype=text/javascript');
Configuration
[edit]Add the following code to your common.js to get rid of the square brackets:
window.copySectionLinkNoSquareBrackets = true;
History
[edit]This script is a fork of User:Enterprisey/copy-section-link, which was inspired by User:Bility/copySectionLink. Forking was necessary due to changes in HTML layout, which broke Enterprisey's version. This fork also includes fixes by User:The Earwig.