This is a
User Script documentation page! This page describes a user script written by Wikipedia user. |
Description | Easy copy/paste diffs from history and contributions pages |
---|---|
Author(s) | Alexander Davronov |
Status | Rare bug fixes (since January 2022) |
First released | May 12, 2021 |
Version | 2.6.7 |
Updated | August 7, 2023 |
Browser support | Chrome 92.0+ ( Blink-based), Firefox 90.0+ |
Skin support | Vector Legacy |
Source | HistoryHelper.js (on github) |
History Helper is a plugin for Wikipedia that allows you to extract WP:DIFF links from « View history» and « User contributions» pages into a Wikitext markup to be further used on talk pages. It's is primarily intended for discussions and advanced users. See demos & examples below.
This plugin creates a toolbar at the top of the « View history» pages with buttons and adds a checkbox to revision every entry below that. When entries are selected by using checkboxes click the button to copy them into the clipboard.
Depending on the button choosen, all selected entries are going to be wrapped up either into a list of {{ diff2}} template tags, table, or special:diff/ links to be used on talk pages. By default, plugin adds names of the users who made copied edits. Move a cursor over any button to see a pre-rendered preview of the selected entries.
By default it also {{ Highlight}}s some uncivil words in the summaries. Additional words can be added by using regular expressions.
Plugin binds a few key strokes. See demons below.
Here are listed examples of the copied diff links entries and their corresponding rendered results. The diff links were taken from different history pages.
Copies selected entries as {{ diff}} template content:
Copies selected entries as table content:
# | DIFF | CURRENT | USER | SUMMARY |
---|---|---|---|---|
0 | 18:50, July 23, 2021 | 18:50, July 23, 2021 | Theroadislong | Reporting The official Gabriel Tembo. |
1 | 18:48, July 23, 2021 | 18:48, July 23, 2021 | Slatersteven | User-reported |
2 | 18:47, July 23, 2021 | 18:47, July 23, 2021 | Slatersteven | User-reported |
Copies selected entries as WP:SPECIAL diff link. These are useful for summary edits links (this feature was requested by Qwerfjkl on [15:11, July 18, 2021).
Insert the following into your common.js:
importScript('User:Alexander Davronov/HistoryHelper.js');
You may also use handy Script Installer to install this one.
As of v2.6.0
the configuration of shortcuts and a default placeholder-wrapper was deprecated. Old configs are going to work in legacy mode. Don't expect them to work in the future.
By default HH higlights some uncivil referrings (see full list here at LINE839). You can add your own words or phrases by using the following config below. You have to use Regular Expressions for matching. By default every word is highlighted by using {{ highlight}}.
window.HistoryHelper= window.HistoryHelper || {};
window.HistoryHelper.highlights=
// match liar 2 times, or pants, or "on fire"
/(liar){1,2}|pants|on fire/ig
];
If copied diffs don't match revisions of the History/Contribution page let me know on my talk page. Don't forget to provide a link to the page.
Some summary text may contain broken wiki markup which may be disruptive (the workaround is to fix mistakes). E.g. (wrong braces):
{{diff2|883393295|878096673|...}} -''«[[WP:BOLD|BOLD]ly] rm "recently" per talk page»''
Currently this plugin doesn’t international wikipedias (i.e. outside of en.wikipedia.org
domain). Date locales may be parsed wrongly or with errors.
The plugin is open source and provided free of charge. It doesn't gather, store, or send any sensetive information. It never accesses your cookies, neither it tries to obtain any sensetive data via fake dialogs etc. Checkout the source code to make sure there is no suspicious code before using this plugin.
This plugin is provided as is. No warranties or gurantees that it works properly all the time or doesn't disrupt your wikipedia experience whatsoever.
Only important changes are mentioned.
v2.6.5
v2.6.0
v2.6.6