User:Alexander Davronov/HistoryHelper

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 Highlights some uncivil words in the summaries. Additional words can be added by using regular expression s.

Usage

 * 1) Go to any «View history» or «User contributions» page
 * 2) Select entry by clicking on the checkbox[es]
 * 3) Hit the button on the toolbar to copy selected entry's diff as a text
 * 4) Paste into your reply on the talk page (see Examples below)

Controls
Plugin binds a few key strokes. See demons below.
 * Click — on checkbox to select multiple entries simultaneously.
 * Shift — on checkbox to select multiple entries simultaneously.
 * Ctrl — to copy entries into the clipboard as Diff2s list. - Deprecated in 2.6.0

Examples
Here are listed examples of the copied diff links entries and their corresponding rendered results. The diff links were taken from different history pages.

Diffs button
Copies selected entries as diff template content:

Table button
Copies selected entries as table content: {{divbox|1=grey|2=Example of copied wiki markup|3= { }}

Links button
Copies selected entries as WP:SPECIAL diff link. These are useful for summary edits links (this feature was requested by on [15:11, July 18, 2021).

Install
Insert the following into your common.js:
 * importScript('User:Alexander Davronov/HistoryHelper.js');

You may also use handy Script Installer to install this one.

Configure
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.

Highlight words in comments
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 Expression s for matching. By default every word is highlighted by using highlight.

Known fixed bugs

 * Main page's history isn't supported yet.


 * Special:Log page erroneously lists checkboxes for selections (e.g. link (don't forget to click button)) — reported by on [21:41, August 7, 2021].
 * Various issues on international wikis and some history pages. — reported by Jon (WMF)  on [Aug 4, 2023, 18:13]

Reporting
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.

Summary text
Some summary text may contain broken wiki markup which may be disruptive (the workaround is to fix mistakes). E.g. (wrong braces): -«[[WP:BOLD|BOLD]ly] rm "recently" per talk page»
 * undefined

I18n
Currently this plugin doesn’t international wikipedias (i.e. outside of en.wikipedia.orgdomain). Date locales may be parsed wrongly or with errors.

Security statement
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 dialog s etc. Checkout the source code to make sure there is no suspicious code before using this plugin.

Disclaimer
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.

Changelog
Only important changes are mentioned.


 * v2.6.5: The tag re with automatically inserted user names of the edits was added.
 * v2.6.0: Keyboard shortcuts removed
 * v2.6.6: Replace diff2 by diff

=See also=
 * User scripts/List
 * Gadget – gadgets are user scripts or CSS snippets that can be enabled simply by checking an option in your preferences. The gadget's function is provided by the MediaWiki extension Extension:Gadgets.