Jump to content

User:N8wilson/AQFetcher: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Image example of execution included, limitations clarified.
added redirection limitation
Line 18: Line 18:
* '''Article Namespace''' - By design the script only runs when browsing in the article namespace. It will not stylize links on pages in User:, Talk:, Wikipedia:, Category:, or any other namespaces. I wrote this way because I'm already uncomfortable with the number of API XHR requests the script makes on large pages. --[[User:N8wilson|N8]] 21:01, 31 October 2015 (UTC)
* '''Article Namespace''' - By design the script only runs when browsing in the article namespace. It will not stylize links on pages in User:, Talk:, Wikipedia:, Category:, or any other namespaces. I wrote this way because I'm already uncomfortable with the number of API XHR requests the script makes on large pages. --[[User:N8wilson|N8]] 21:01, 31 October 2015 (UTC)
* '''Multiple classification''' - If an article has multiple classifications (by different WP projects for example) the classification to which this script gives preference is undefined.
* '''Multiple classification''' - If an article has multiple classifications (by different WP projects for example) the classification to which this script gives preference is undefined.
* '''Redirects''' - Links which have not been updated and point to a redirect page will not be stylized according to the redirection target.
* '''Speed''' ...it's not super fast. I can usually see the styles applied in phases after the article page loads.
* '''Speed''' ...it's not super fast. I can usually see the styles applied in phases after the article page loads.

Revision as of 21:29, 31 October 2015

Example of AQFetcher stylizing a portion of the Wikipedia home page on Oct. 31, 2015

Article Quality (AQ) Fetcher will classify as many links as possible according to the quality of their target article and assign CSS classes accordingly. The following CSS classes are used:

   AQ-FA    AQ-A    AQ-Start          AQ-Unclassified
   AQ-GA    AQ-B    AQ-Stub           AQ-Unknown
            AQ-C

These correspond to the standard grades listed at Wikipedia:Version_1.0_Editorial_Team/Assessment

AQ-Unclassified and AQ-Unknown are the only additions. The script is a work in progress and for the most part these two categories can be treated as the same. In the future, AQ-Unclassified should indicated that the target article has not yet been evaluated for quality. AQ-Unknown on the other hand will always indicate that this script could not determine whether the target article was assessed or not.

Styles and Colors

If the script is used in isolation there will be no color changes on Wikipedia. The only changes the script makes are to add class attributes to link elements in article pages. Feel free to use your own styles following the CSS models at User:N8wilson/AQFetcher.css.

Acknowledgements

Key acknowledgement goes to Anomie whose link classifier script (User:Anomie/linkclassifier.js) was used as an initial template structure to get up an running quickly with the MW API. Go check it out if you're interested in a lot more ways to classify and color various links on MediaWiki sites.

Known Limitations

  • Article Namespace - By design the script only runs when browsing in the article namespace. It will not stylize links on pages in User:, Talk:, Wikipedia:, Category:, or any other namespaces. I wrote this way because I'm already uncomfortable with the number of API XHR requests the script makes on large pages. --N8 21:01, 31 October 2015 (UTC)
  • Multiple classification - If an article has multiple classifications (by different WP projects for example) the classification to which this script gives preference is undefined.
  • Redirects - Links which have not been updated and point to a redirect page will not be stylized according to the redirection target.
  • Speed ...it's not super fast. I can usually see the styles applied in phases after the article page loads.