User:Anomie/linkclassifier

This script adds various classes to the link elements based on various characteristics:

  • deletion – The target page is in one of the many "X for deletion/discussion" categories, or certain speedy deletion categories.[1]
  • disambiguation – The target page is in Category:All disambiguation pages.
    • intentional-disambiguation – The target page's name ends in "(disambiguation)".
  • set-index – The target page is in Category:All set index articles.
  • needs-review – The target page has pending changes in need of review.
  • featured-content – The target page is in one of the Featured Content categories.
  • good-content – The target page is in Category:Good articles.
  • soft-redirect-cats – The target page (most likely a category link) is in Category:Wikipedia soft redirected categories.
  • spoken-articles – The target page is in Category:Spoken articles.
  • stubcls – The target page is in any category ending in "stubs".
  • nonfree-media – The target page is in Category:All non-free media.
  • nonimage – The link does not have the image class, which is added by MediaWiki to image links.
  • has-draft – The target page is a mainspace page, and the corresponding Draft-namespace page exists.
  • redirect – The target page is a redirect.
    • self-redirect – The target page is a redirect to the current page.
    • broken-redirect – The target page is a redirect to a page that does not exist.
  • incorrect-title – The target page is a redirect from an incorrect title, such as those in Category:Redirects from misspellings or Category:Redirects from incorrect names.
  • unprintworthy – The target page is an unprintworthy redirect.
  • unprintworthy-shortcut – The target page is in Category:Redirects from shortcuts.
  • protection-type-level – The target page is protected. If the page is a redirect, the protection status will be obtained from the redirect target. type is the type of protection, for example "move", "edit", "create", and level specifies the level, for example "sysop" or "autoconfirmed".
    • protection-type-level-indef – The target page is indefinitely protected.
  • redir-protection-type-level – The redirect to the target page is protected, as above.

You can then add CSS rules to apply various visible changes to the different types of links. A number of default rules are available in User:Anomie/linkclassifier.css.

  1. ^ Due to technical limitations it is currently infeasible to check whether a page was previously speedy deleted.