Jump to content

User:SoledadKabocha/linkclassifier2

From Wikipedia, the free encyclopedia
TODO: Actually copy relevant information from User:SoledadKabocha/linkclassifier rather than just noting the changes. Then soft-redirect that page here.

Since I value your privacy, I have no linkback policy, unlike Anomie. That means you do not need to put // [[User:SoledadKabocha/linkclassifier2.js]] anywhere in your user skin. (Don't use // [[User:Anomie/linkclassifier.js]] either, as that would be misleading to Anomie.)

Instead, I encourage you to talk about any questions and comments either here or on my main user talk page.

  • Articles with correspondingly-named drafts are detected (has-draft class) per Anomie's original script.
  • New boolean preferences: window.LinkClassifierIgnoreRedirectedFrom, window.LinkClassifierSkipDraftDetection, window.LinkClassifierAddPortletLinkManually, window.LinkClassifierJsMessageOnError (Names should be self-explanatory; default is false for all except window.LinkClassifierJsMessageOnError)
  • The redirect-grammaticalnumber class has been renamed to unprintworthy-assoc (that is, "associated with unprintworthy status") and also includes Category:Redirects from other capitalisations. Now incorrect-title per the original linkclassifier
  • The following status variables, which were formerly global (window properties), have been moved to properties of the LinkClassifier object. This affects you if you are reading these properties in other scripts from mw.notify or otherwise. No compatibility shims (aliases) are provided; you must update your script.
    • LinkClassifier.requestsOutstanding (was window.LinkClassifierApiRequestsOutstanding)
    • LinkClassifier.oldOnbeforeunload (was window.LinkClassifierOldOnbeforeunload)
    • LinkClassifier.unloadHandlerRemoved (was window.LinkClassifierUnloadHandlerRemoved)
  • Error messages no longer name the function that triggered the failed request, since modern browsers' built-in developer tools should be sufficient to find that information.
  • The uncategorized class, which by definition follows redirects to their targets (unlike redir-uncategorized), now works more or less correctly. It is always enabled, that is, not controlled by any preference. If you don't care, simply don't add a CSS rule. Edit: It at some point started experiencing a noticeable rate of false positives again, probably related to one batch of API requests finishing before the next one is ready to start; I wouldn't really call it "more or less correctly."

Features to consider

[edit]
  • Regarding page properties, decide whether has-props (or has-any-props?) and no-props classes might be useful.