User:NguoiDungKhongDinhDanh/FormattedEditRequest

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.

Installation
After installing the script, bypass the cache of the page.

Click on the button below. If it doesn't appear after a few seconds, then try.
 * Method 1:

This can be used on any Wikimedia project.
 * Method 2:
 * 1) Place  on the bottom of your common.js page or your skin.js page.
 * 2) Press Publish changes (ignore any error warnings).

How-to
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:

