User:Pyrospirit/metadata

From Wikipedia, the free encyclopedia

This is how article titles appear for various types of articles.
This is how article titles appear for various types of articles.

The metadata script is a user script that displays the article quality rating of every article page you visit as a part of the title. This is useful because it allows you to get a general idea of an article's quality without going to the talk page or reading the entire article yourself.

It works by finding the assessment data from the intro section of the article's talk page, then alters and colors the article header and tagline based on that information. The article headers are colored using the color scheme of {{grading scheme}}.

Contents

[edit] Installation

There are two ways to use this script:

  • Install the gadget version through Special:Preferences, on the gadgets tab. This version will always be functional, but bug fixes or changes I make to the script won't occur immediately in the gadget version.
  • Or, you can install the non-gadget version of the script using your monobook.js, modern.js, or other skin's JavaScript page, using {{subst:js|User:Pyrospirit/metadata.js}}. This version may occasionally break for a few minutes when I'm testing out a change to the script, but you get the latest changes faster.

[edit] Source code

[edit] Bugs and feature requests

If you find a bug, please report it at User talk:Pyrospirit/metadata, making sure to include some information about what went wrong, what browser you're using, what page it occurred on, and things like that. Or, if you're an administrator and you know how to fix it, just do so yourself at User:Pyrospirit/metadata.js.

Requests for a feature to be added to the script should also be made at User talk:Pyrospirit/metadata. Note that the sort of changes I will make are improvements to its current function of displaying an article's assessment in the page header, not adding whole new features. So, if it doesn't detect a certain article status that it should or if you want something to be more customizable, I'll probably make the change.

[edit] Customization

To change the colors used by this script, place the following code in your JavaScript page (monobook.js, modern.js, etc.), replacing some color with the name or hexadecimal code of whatever color you want.

MetadataAssessmentColor = {
    link  : "some color",
    FA    : "some color",
    A     : "some color",
    GA    : "some color",
    B     : "some color",
    C     : "some color",
    start : "some color",
    stub  : "some color",
    list  : "some color",
    dab   : "some color",
    redir : "some color",
    none  : "some color"
}

To use the default color for something, simply omit the whole line for that color. You can change as few or as many colors as you want. This should work regardless of whether the script is manually installed or installed as a gadget.