Jump to content

User:NguoiDungKhongDinhDanh/FormattedEditRequest

From Wikipedia, the free encyclopedia
FormattedEditRequest
Author(s)NguoiDungKhongDinhDanh
StatusBeta
First releasedApril 1, 2022; 2 years ago (2022-04-01)
UpdatedJune 12, 2023
    (16 months ago)
SkinsOnly tested with Legacy Vector
Source

FormattedEditRequest is a script that helps edit requestors in visualizing their requests. It only works when the page you are viewing is living, not technically editable to you and its content model are one of the text-based: wikitext, (plain)text, sanitized-css, JSON, Javascript, CSS and Scribunto.

It was created on a request by Enterprisey at WP:US/R (perl) and the request itself was inspired by an edit request by Tol.

Installation

[edit]

red-outlined triangle containing exclamation point Warning: You are not logged in. Please create an account or log in to proceed. After installing the script, bypass the cache of the page.

Method 1

Click on the button below. If it doesn't appear after a few seconds, then try this link.

Install Button

Method 2

This can be used on any Wikimedia project.

  1. Place {{subst:js|1=User:NguoiDungKhongDinhDanh/FormattedEditRequest.js}} on the bottom of your common.js page or your skin.js page.
  2. Press Publish changes (ignore any error warnings).

How-to

[edit]
Here's how the link looks like in Legacy Vector.
And this is our form.

When viewing a living page that is not editable to you (not when checking history, reading info etc.), a link will be added to the p-cactions menu of yours. After clicking it, a text box contains the page's content will soon appear. Perform the edit you want to do, then press "Submit" to get the diff.

If the process takes more than 10 seconds, an error will be shown and the page will reload after a few seconds. Also, if no changes were made, the script will not return anything. Otherwise, a "Copy" button will appear along with the diff. The rest is up to you: Copy the diff, or make another edit and submit again. If "copy" is pressed, a table like this should be copied to your clipboard:

Line 3: Line 3:
<div id="mp-welcomecount"> <div id="mp-welcomecount">
<div id="mp-welcome"><h1>Welcome to [[Wikipedia]]</h1>,</div> <div id="mp-welcome"><h1>Welcome to [[Wikipedia]]</h1>,</div>
<div id="mp-free">the [[free content|free]] [[encyclopedia]] that [[Help:Introduction to Wikipedia|anyone can edit]].</div> <div id="mp-free">the [[Wikipedia:Buying Wikipedia articles in print or another|non-free]] [[encyclopedia]] that [[Wikipedia:Edit requests|no one can edit]].</div>
<div id="articlecount">[[Special:Statistics|{{NUMBEROFARTICLES}}]] articles in [[English language|English]]</div> <div id="articlecount">[[Special:Statistics|{{NUMBEROFARTICLES}}]] articles in [[English language|English]]</div>
</div> </div>