User:Ahecht/Scripts/RedirectID
Author(s) | Ahecht |
---|---|
Status | Stable |
Updated | October 16, 2024 (27 days ago) |
Source Beta | User:Ahecht/Scripts/RedirectID.js User:Ahecht/sandbox/Scripts/RedirectID.js |
Ahecht's RedirectID is a script that modifies the "title" HTML attribute of wikilinks to include both the redirect and the target of the redirect (e.g. "Wikipedia:Wikilink" becomes "Wikipedia:Wikilink → Help:Link § Wikilinks"). This is useful for users not using Navigation popups as well as users using screen readers or other accessability software.
To use this script: Copy the line below, then [[click here to install locally]] or [[click here to install across all wikis]], paste the line, and hit Publish changes:
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Ahecht/Scripts/RedirectID.js&action=raw&ctype=text/javascript' ); // RedirectID [[User:Ahecht/Scripts/RedirectID.js]]
Report any issues to me, Ahecht.
You can use this script in conjunction with the following CSS code to display icons next to all wikilinks to redirects. The CSS code can be added to Special:MyPage/common.css or, if you want it to work across all wikis, to meta:Special:MyPage/global.css:
.mw-redirect {
background: url(https://upload.wikimedia.org/wikipedia/commons/thumb/7/76/Insert_redirect.png/12px-Insert_redirect.png) center right no-repeat;
padding-right: 13px;
}