Page MenuHomePhabricator

Create a user script to enable Edit Check
Closed, ResolvedPublic

Description

This task involves the work of introducing a user script that, once installed, would enable someone to experiment with Edit Check, regardless of if and how the feature is enabled at the broader project they're seeking to experiment with it on.

Story

  • As an experienced volunteer who is curious to try out Edit Check and offer feedback about it, I'd like there to be an easy/straightforward way for me to enable the feature for myself, so that I can experiment with it in an environment that resembles how newcomers are likely to experience it if/when it is enabled by default.

Requirements

  1. Introduce a user script that, once installed to someone's Special:MyPage/common.js page, would result in the following:
    • A) Edit Check being activated if/when an edit they're attempting to publish meets the default configuration values documented on mw:Edit check/Configuration
    • B) Relevant Edit Check tags (see mw:Edit check/Tags) being appended to edits people who have the gadget enabled make
  2. The user script this task is asking us to introduce should OVERRIDE the maximumEditcount parameter. Said another way: for people who have the gadget enaled/installed, Edit Check should activate in any qualifying edit, regardless of the person's edit count.

Background

This task emerged from us coming to learn from @Dyolf77_WMF that volunteers were finding the URL parameter T345297 introduced a bit complicated. As a result, they were seeking a simpler way of trying out Edit Check.

Related

Done

Event Timeline

ppelberg renamed this task from Create a gadget to enable Edit Check to Create a user script to enable Edit Check.Nov 8 2023, 1:34 AM
ppelberg updated the task description. (Show Details)

Change 956975 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Allow a global variable to forcible enable edit check

https://gerrit.wikimedia.org/r/956975

Change 956975 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Allow a global variable to forcible enable edit check

https://gerrit.wikimedia.org/r/956975

There unfortunately wasn't a train this week, so the variable patch isn't actually available off the beta cluster. Next week's train should run, so this will be available on all wikis by December 14th.

Once it is, all that needs to be done is adding the following to your user JS: window.MWVE_FORCE_EDIT_CHECK_ENABLED = true;

There's instructions for doing this here.

Alternately, I made a (trivial) external script here that can be added via the installer gadgets or via adding the following to your user JS: mw.loader.load( 'https://meta.wikimedia.org/w/index.php?title=User:DLynch_(WMF)/alwaysbechecking.js&action=raw&ctype=text/javascript' );

The only advantage of the latter is the aforementioned installer-gadgets, and that I'd presumably update it if we make any changes to how the trigger works.

This should be completely deployed and usable now, via standard userscript-installation processes.

EAkinloose subscribed.

Tags are attached as expected. Tested tags in prod and beta.
Tested user script OVERRIDE behaviour in prod

Screenshot 2024-04-23 at 23.04.13.png (262×1 px, 88 KB)

Screenshot 2024-04-23 at 23.20.17.png (298×2 px, 151 KB)