dev

ReportArticle adds a "Report article" button to the page actions menu. When clicked, it asks the user for a required reason, then creates a Message Wall thread for every member of the configured group(s). It rate-limits to one report per page per day, skips bots and the Abuse Filter system user, and is visible only to logged-in users.

Installation

Configuration

Using configuration options with Fandom Developers Wiki scripts

The instructions on this page describe how to use configuration options with a script. Here on the Fandom Developers Wiki, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS is used to load the scripts, it will be executed last.

Configuration options load too late, don't work
// 1. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;

// 2. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

Configure the script by defining window.reportArticleConfig. All fields are optional; defaults are shown below.

Behavior notes

Usage

After installation, a "Report article" entry appears in the page actions. Click it, enter a reason, and the script posts a thread to each target user’s Message Wall with your configured title and body, plus the reason. A notice confirms how many users were notified. If a report for the same page has already been sent that day, a warning appears instead.

Example

// Example configuration
window.reportArticleConfig = {
  group: ['sysop', 'content-moderator'],     // can be 'group' (string) or ['group','group']
  title: 'Reported article: $1',             // $1 → page name (plain text)
  body:  'An article has been reported: $1\n\nPlease review.' // $1 → link to the page
};

Changelog

Current version
1.0.0 No known bugs
1.0.0
MAJOR: Initial version with per-day throttle, required reason prompt, and group-targeted Message Wall posting.

Planned Updates

Text above can be found here (edit)