User:AndyZ/peerreviewer

Source: Wikipedia, the free encyclopedia.

Introduction

Despite its name, reviews created by this script aren't by peers, but by a JavaScript (written by peers, though). "Peer" is in there to clarify its purpose.

The suggestions generated by the script focus largely on style issues, e.g. those that can be found on

WP:FARC (most of these tips are covered by my suggestions page
). Though most of the tips are generally accurate, some will not be accurate/applicable for the article in question.

Fixing the generated issues is not mandatory (for

peer review for other editors to elaborate upon or my talk page
.

Note:

semi-bot. The current automated peer review listings can be found at Wikipedia:Peer review/Automated/July 2024
.

Some FAQs [edit]:

Installation

You do not need to have an account in order to use this tool. (However, if you don't, please make one).

For logged-in users, follow the instructions below. IP users or users who do not wish to install the script (for whatever reason) can follow the directions below. If you still cannot understand the following instructions or receive an error that seemingly can't be fixed no matter what you do, just drop a note on my talk page.

Logged in

For those of you who are familiar with the process, you can skip this section (the source code is at

bypass your cache
. In more detail:

  1. The following instructions assume you are using the default Vector skin on Wikipedia. If you are using a different skin then you need to edit a different file and ignore references to "vector.js". If you are using the Monobook skin then you need to edit monobook.js and so on.
  2. Open your vector.js (link: vector.js).
  3. Add the following line to your vector.js:
    {{subst:js|User:AndyZ/peerreviewer.js}}
    which should expand to the contents of Template:js.
  4. Save and then
    WP:BYC
    .
  5. Go to edit mode for any article (must be in the article namespace). There should be a "peer review" link right next to the "log out" link. On clicking, it presents suggestions for the article generated by the code. (Some suggestions will appear in template form because they contain parameters – the content of these can be found by searching on
    User:AndyZ/PR
    or by copy+pasting the suggestions to a new page [sandbox, talk, etc.] and using the preview/save buttons).
    To have the "peer review" link appear next to the "log out" link for articles while not in edit mode also, add to your monobook.js:
    toolbarLink_PR = true;
    Other configurable options are listed below, at #Options.

Problems? Make sure that you

bypass your cache
(and also that JavaScript is not disabled).

If this fails (from Wikipedia:Tools/Navigation popups/FAQ), if you have a lot of stuff in your user javascript file, it's possible that it's conflicting with the script. Remove everything except the PR installation and see if that helps. If it does then you can start adding things back piece by piece to see where the conflict lies.

Note that the script may conflict with itself if it is loaded twice.

Anons/lazy users

IP users and logged-in users who don't wish to install the script directly can still use this script, but it will be less convenient. While in edit mode for an article, replace the URL (address) bar with (be sure to copy the entire thing!):

javascript:importScript('User:AndyZ/peerreviewer.js');output_PR = 'wpTextbox1';JSpeerreview_simple();

Hit Go/Press Enter, and this will simply replace the article with the suggestions (be sure NOT to save!, but you can use the 'Show preview' button to see the suggestions). However, this will lack the options and versatility of directly installing the script. Also note that this will cause several errors, but these shouldn't affect the actual output of the script.

To bookmark/add this to favorites, see /bookmark.

Uninstallation

The uninstallation is simple: search your monobook.js for the following line and delete it, and then

bypass your cache
:

importScript('User:AndyZ/peerreviewer.js'); //[[User:AndyZ/peerreviewer.js]]

Features

BSD
) is shown.
Note: whenever I mention monobook.js below, it also applies to the other JS files based on the current skin

The main purpose of the peer reviewer script is to create

User:AndyZ/PR
).

A secondary feature is to make an automated style cleanup of the article. This will only take care of a few minor issues (from

WP:MOS and other guidelines). It is activated by the button that reads "Autoformat article per MoS". See #Formatter
.

  • Configurable:

Basic spell-checking is also provided by the script (similar to User:Lupin's anti-vandal script s spell-checker), but will not work like MS Word's or that of other spell-checking software. Instead, this is based upon common misspellings found at Wikipedia:Lists of common misspellings/For machines (If you think the list of common misspellings is faulty, please view and/or prudently edit it). While the script will take considerably long to execute, it may help to locate some typos. To use this, add spellcheck_PR = true; to your monobook.js.

For maintainers of

WP:PR
. These however will inhibit normal activity on Wikipedia (ex. it opens up the review immediately). To use this, add maintain_PR = true; to your monobook.js.

Also provided in the script is a tab that states "send to WP:PR". Clicking on the tab completes most of the

WP:PR
, and the starting of the actual nomination text. Be sure to use the difference button to check these edits before submitting them. (no longer in use; may attempt to restore later. To try, use sendTo_PR = true;)


Transcluded scripts
  • Instaview, the Live Preview script written by User:Pilaf (2005-6), is included within the PR script. To use it, add showInstaview_PR = true; on a new line to your monobook.js. It allows you to preview pages without having to reload the page by clicking the 'Show preview' button.
  • User:Omegatron's addlink script is included. Alone, the addlink script does nothing; it is a helper script to include tabs/links to execute other functions.
  • User:Gimmetrow's ref fixer script, which cleanups footnote spacing problems, is executed with the autoformatting button.
  • MOS:NUM
    issues, and can be executed again with the autoformatting button. (The controversial date-delinking part of the script has been excised)

Suggestions

Formatter

Options

To change a configurable option, add a line to your monobook.js:

option = value;

, replacing option with the name of the variable from below, and value with one of the possible values listed below.

Be sure to copy the option exactly as it is written on the table. Only add quotes (single (') or double (")) if the Other values column states to do so. Beneath the table are explanations for some of the more complicated/unique variables.

Notes:

  • defaultView_PR – if assigned the value of 1, the suggestions will appear in template format (instead of posting the suggestions in prose, it will list almost all of the generated suggestions as {{subst:User:AndyZ/PR/~~}}). Pros: after checking the diffs or saving, the output will exactly match the template, while it may be slightly outdated if it were listed out in prose. Cons: it is hard to understand what the template is dealing with.
  • If it is assigned the value of 2, the suggestions will be in prose and will be followed with footnotes. These footnotes link to notes on
    WP:PR/A
    or its subpages)
  • toolbar_PR – "cactions" refers to the tabs (similar to the edit, move, etc.); "navigation" refers to the navigation links at the top left hand corner. With both, the peer review link will be at the bottom of the list.
  • cat_PR – alphabetizing categories is controversial; therefore, the suggestions will not note about the alphabetization of categories unless this variable is set to true (but it will note
    WP:ILs
    )
  • restoreStyle_PR – see
    CSS
    . Style attributes are listed, following by a colon/equal sign and the value for the attributed. Ex. to set the color to orange instead, use restoreStyle_PR = "background:orange";.