![]() diff restorer active in the diff view, displaying restore and success icons. | |
Description | Effortlessly restore deleted lines while editing and viewing changes. |
---|---|
Author(s) | Aram |
Status | Experimental |
First released | February 24, 2025 |
Version | 1.0.3 |
Updated | February 14, 2025 |
Browsers | almost all (but not tested on all) |
Skins | all |
Source | User:Aram/diff restorer.js |
diff restorer makes it easy to restore deleted lines and delete added lines in the diff view while editing without manual find-and-replace or copy-pasting. Simply click the button (or
for RTL projects) next to a deleted line to instantly restore its content into the edit box.
To install diff restorer on English Wikipedia, add the following line to your common.js:
importScript('User:Aram/diff restorer.js'); // Backlink: [[User:Aram/diff restorer.js]]
For all projects, add the following to your your global.js (on Metawiki):
// [[:en:User:Aram/diff restorer.js]]
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Aram/diff_restorer.js&action=raw&ctype=text/javascript' );
After installing, edit any page by deleting, adding or modifying some text. Then, click
or press Alt+⇧ Shift+v to view the differences.If a deleted, added or replaced line appears in the diff, you’ll see (or
for RTL projects) next to it. Each line has its own restore button.
Clicking a button will display for successful restorations or
for failed ones. The script can detect moved paragraphs, restore their contents and move back them to their original position they were before.