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.
// 1. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 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.
grouporgroups— a string (e.g.,'sysop') or an array (e.g.,['sysop','content-moderator']). Members of these groups receive the report on their Message Wall.title— thread title.$1is replaced with the page name as plain text.body— thread body.$1is replaced with a link to the page. The user’s typed reason is appended under "Reason:" on a new paragraph.
- Behavior notes
- Visible only to logged-in users.
- Per-page, per-day throttle.
- Skips posting to
User:Abuse filterand any user in thebotgroup.
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
- Optional page whitelist/blacklist
- Configurable throttle window
- Admin-only override to bypass daily throttle