User talk:Stepshep/assessment.js


 * Image:Stepshep-script-demo.PNG|frame|A picture. 1000 words.]]

See July 1 section for important changes.

Metadatatest.js is a Javascript tool that allows the user to assess an article for a selected project from the article page, rather than visiting, opening, and manually editing the article talk page. The script is not really in "test" mode any more, but resides here for now.

To try it, add the script to your monobook.js page (Special:Mypage/monobook.js)—see. If the script is working, you will see assessment information as shown in the image at right. The color of the article title will roughly match the  color scheme of the assessment grades. The script also informs if the article is currently a good article candidate or featured article candidate, or in peer review, with a link to the related page.

You can assess an article for a given project by using the available drop-down boxes and the grade links below it. The drop-down menu below the assessment allows you to select a project relevant to the article. Clicking on an assessment class below the drop-down menu opens the talk page in Preview mode. (A message on the preview page will say: Sorry! We could not process your edit due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in—this warning has no effect on your ability to save the page.) The appropriate project template will be added or filled in with the parameters you chose. Review the edit, then save the page. The edit summary will be filled in.

Use
As with any automated tool, you are responsible for your own edits. I'm lazy and not much for change control, so an update could accidentally lead to the script temporarily not working!

Directions
Mostly self-explanatory. Clicking on a grade link once you've chosen drop-down box parameters initiates the loading of the talk page with the updated template.

Keyboard shortcuts (accessibility thingies) are available, with alt-1 (or similar, depending on your browser) being the equivalent of clicking "Stub", alt-2 for "Start", and alt-3 for "B".

A cookie keeps track of the number of articles assessed. This is shown as "(n assessed)", where n is a number and a link, and where clicking on the link resets the counter to zero.

Installation
In your monobook.js,
 * 1) copy and paste the five lines below into monobook.js. (If you are using my former metadata.js, remove it.) Next, you will customize two of the lines so the script does what you want.
 * 2) replace the template code in the "assessmentMyTemplateCode" line with the names of the templates you want to use. Include any template options you wish. Here you are specifying which templates will show up in the script interface for adding to articles. (You could have one or thirty.) Most wikiproject templates have the form "", so when in doubt, just replace "TemplateName" with the desired template. The syntax of this line is to place the template code inside quotation marks, with a comma after each template code except the last, and square brackets around the whole set of quotation marks, code, and commas. You should be able to figure this out by looking at the example installation.
 * 3) specify your default template by changing assessmentDefaultProject to equal whatever you want as a  default. It should be an exact match to a template listed in your collection, with the correct spelling and letter case.
 * 4) Save the edit to monobook.js, then refresh your browser as the page directions indicate.

// User:WHO/WHAT.js &lt;nowiki> importScript('User:WHO/WHAT.js'); assessmentMyTemplateCode = ["", "", ""]; assessmentDefaultProject = "TemplateA"; //

User options
For all options, spelling and CaSe are important. All settings are specified in your "monobook.js".

assessmentMarkAsMinor = false;
 * You can specify whether assessment talk page edits should be minor or not. To make them "not minor", add the following to your monobook.js:

assessmentOverrideWatchPref = true;
 * The script will maintain all watchlist settings, and if you have the Wikipedia Preference "Add pages I edit to my watchlist" turned on, by default all assessed articles will be added to your watchlist. To prevent this (i.e. to maintain the watchlist status of only pages you already have watchlisted), add the following to your monobook.js:

assessmentDefaultPriority = "Mid"; // (applies to any project with priority/importance ratings) assessmentDefaultWorkGroup = "workgroupname"; // (applies to WPBiography - example "politician-work-group") assessmentDefaultLiving = "yes" or "no"; // (applies to WPBiography - defaults only if status cannot be determined from the article) assessmentDefaultMilHistTaskForce = "task-force-name" // (applies to WPMILHIST)
 * You can set the following defaults related to WPBiography or other projects: