User:Dlrohrer2003/random-disambig-link

Random Disambig Link
DescriptionAdds a link to go to a random disambiguation page
AuthorDlrohrer2003
Status
Release
UpdatedMay 12, 2025; 13 months ago (2025-05-12)
SourceUser:Dlrohrer2003/random-disambig-link.js

This Random Disambig Link script add a link to the Navigation portlet to go to a random disambiguation page.

Installation

edit

To install this script, go to your common.js page and add the following line of code:

{{subst:lusc|User:Dlrohrer2003/random-disambig-link.js}}

History

edit

Originally, this user script started of as a fork of Splarka's own script: randab.js. That script used the API to request information on a group of articles, look through the categories those articles were a member of, and check to see if any were a member of the category All disambiguation pages. If no pages were found, then it would keep requesting information on groups of pages until one was identified. Then it would go to that page.

Years later, I discovered that the random in category special page existed. After that, I wound up changing the portlet link to go there instead of having to do the whole API thing.

Styling

edit

The portlet link does have the class 'mw-disambig' added to it so that the link can be styled along with the other disambiguation links.

See Also

edit