Jump to content

Instant Diffs/News

From mediawiki.org
The logo's colors symbolize added and removed content in revision diffs.
The logo's colors symbolize added and removed content in revision diffs.
Instant Diffs using the light color scheme in Vector 2022
Instant Diffs using the dark color scheme in Vector 2022

This page documents the development history and changes for Instant Diffs , a gadget that improves the user experience when viewing diffs and revisions across MediaWiki projects.

Instant Diffs uses zero-based versioning, starting from version 0. Each version number represents the changes made since the previous version (e.g., version 1 includes changes from v0 to v1, version 5 includes changes from v4 to v5). This incremental approach allows for focused development cycles where different aspects of the gadget can be systematically improved. Major version numbers are incremented when a planned set of improvements is completed.

Changelog

[edit]

V6.3 (current)

[edit]

Updates

[edit]
  • Updated GitHub Actions workflow files to include permissions and opt-in i18n deployment.
  • Changed behavior of the "Go to page" and its counter-page actions: "Go to page" now always jumps to the current page instead of the subject page.
  • Improved diff lines highlighting behavior: now adds transition animation only when view action was triggered.

Integrations

[edit]
  • Moved GlobalWatchlist specific selectors from the config to the extension, that sets universal selectors.
  • Added indent before event logs in the FlaggedRevs form.
  • Moved Special:PendingChanges diff lines processing from config to the FlaggedRevs extension, that sets universal selectors.
  • Improved diff lines styles on the Citizen skin.

Fixes

[edit]
  • Fixed deploy action script: added fetch-depth: 0 to populate all contributors.
  • Fixed the "Compare latest" action for the first revision.

V6.0 (2026-08-10)

[edit]

Updates

[edit]
  • Added additional CSS variables for customizing Instant Diffs link colors and backgrounds.
  • Added rateLimit and retries configuration parameters for deployment.
  • Added support for MediaWiki watchlist labels feature.
  • Added support for links on the Logs special page.
  • Integrated the new watchlist popup for MediaWiki 1.47.
  • Improved appending section name (hash) to link URLs.
  • Added processing of the page redirect links.
  • Refactored extension integrations into modular structure.
  • Optimized link processing by replacing .filter().map() chain with single-pass for-of loop to reduce iterations.
  • Added user info card button for the foreign diffs.
  • Added diff edit links in the foreign diff view.
  • Marked all revision links in the header on PermanentLink / Revision pages.
  • Added data-instantdiffs-line selector for manually marked lines.
  • Improved edge cases with detecting links with special pages.
  • Added a GitHub Actions workflow that builds and deploys the gadget automatically.
  • Added support for TimedText, Campaign, and Data namespace resource dependencies to the config.
  • The hash provided in the initial link is now persistent through switches between diff and revision views and the back link.
  • Removed notice about limitations in the WikiLambda app as it now shows the actual requested revision (phab:T397902).
  • Added label for the AbstractWiki content model to the View dialog title.
  • Made diff links for the first page edit if possible, otherwise, wrap empty diff links with placeholders.
  • Added navigation to the first diff in the View dialog.
  • Added processing of external links with class extiw that lead to interwiki pages.
  • Added selector-based article dependencies.
  • Changed the build target from ESNext to ES2017 to increase compatibility when the script is deployed as a gadget.
  • Added support for an ES5 build target for deploying the script as a gadget on older wikis.
  • Added "Compare latest" action in the Actions menu.
  • Improved interwiki diff and revision links handling, now supported across all interfaces and user-contributed content (requires MediaWiki 1.47.0+).
  • Rewritten URL handling — regex-heavy parsing replaced with simpler slice/startsWith operations and centralized search-parameter names, for better performance and robustness.
  • Bundled SVG image assets instead of direct links to Commons.

Settings

[edit]
  • Added a setting to enable or disable the watchlist popup.
  • Added visibility conditions for settings fields: the enableMobile option is not shown on wikis where the Minerva Neue skin is not registered.
  • Added a setting to mark links as visited.
  • Added new link format "special" for the copy link action.
  • Added a setting to include text label in the wikilinks.
  • Added a setting to show "Review pending changes" button in additional diff tools (shows only if a user have review user right).
  • Added a setting to enable detailed revision loader for file namespace.
  • Added a hotkey help tooltip with a full keyboard-shortcut reference, help text throughout switched from inline text to tooltips.
  • Added intro section that includes useful help links and contributor list.
  • Settings dialog also respects user preferences with Escape hotkey, and click outside to close behavior.

Projects

[edit]
  • Added support for the dark-grey theme in the Vector legacy skin.
  • Fixed the border-radius styling of the action button in the Citizen skin.
  • Minor cleanup of styles for the MonoBook skin.
  • Fixed diff footer in the Minerva Neue skin.
  • Added glass effect to the diff mobile footer block in the Minerva skin.
  • Fixed user tool links placement in the Watchlist in the Minerva skin.
  • Fixed styles in the revision view in Fandom skins.
  • Added basic suppor of the Cosmos skin.

Integrations

[edit]

Fixes

[edit]
  • Changed the icon of the Pending Changes navigation action to "eyeClosed" to match default appearance.
  • Fixed styles edge case where Instant Diffs links render over Codex buttons.
  • Fixed rollback link confirmation by adding support for the new "data-mw-interface" attribute (phab:T409187).
  • Fixed rollback link empty title error for short wgArticlePath configurations like in Miraheze.
  • Fixed watchlist popup not updating on subsequent watch/unwatch actions.
  • Fixed text selection occurring during alt+click interactions.
  • Fixed blocks shrink when viewing revisions on Wikidata .
  • Fixed a malformed URI error when parsing hashes in the Article class.
  • Fixed CSRF token handling in the Api class.
  • Fixed CSRF token issues when viewing diffs from the GlobalWatchlist .
  • Fixed Instant Diffs icons in empty links in new Parsoid.
  • Fixed diff mobile footer placement in the revision view.
  • Guard the empty-message warning when viewing revisions to prevent some edge-cases.
  • Fixed label for the Lexeme content model in the View dialog title.
  • Fixed navigation between foreign link and back link to the local link.
  • Fixed error notification when request was aborted in the foreign revision view.
  • LTR/RTL diff-table alignment for foreign diffs.

V5.0 (2025-12-26)

[edit]

Updates

[edit]
  • Added support for custom actions in the Actions menu. See the Developer guide .
  • Added support for manual link configuration through the "data-instantdiffs-options" attribute. See the Developer guide .
  • Significantly rewrote the deployment script, which now supports more flexible configuration. See available deployment configuration options on GitHub.
  • Added a category list at the bottom of the content when viewing revisions.
  • Revision content now automatically scrolls to the target section when a hash is provided in the input link.
  • Added new actions to the Actions menu, such as "View page info" and "Edit/View source".
  • Optimized request count in the Page classes by requesting more data with a single page info request.
  • More strict selector for matching links in user-contributed content.
  • Added support for different local special pages that format short links to diffs and revisions, such as Special:ComparePages, etc.
  • Added support for different local special pages where Instant Diffs can run, such as Special:AbuseLog, Special:EditTags, etc.
  • Added a view refresh process after actions like rollback have completed.
  • Added support for diff navigation links in the Special:Diff page in the Minerva Neue skin.

Settings

[edit]
  • Completely rewrote the Settings Dialog. All settings are now organized into tabs.
  • Added the ability to pin actions to the Quick Actions menu. To pin an action, open Actions → Settings → Pinned Actions and select the actions you want to pin.
  • Added new options to: include section hashes in revision link URLs, close the View Dialog by clicking outside of it, and choose between different View Dialog dimensions.

Projects

[edit]
  • Added support for the "Last modified" link in the sidebar as an extension for the Citizen skin.

Integrations

[edit]
  • Translate extension. Adds Instant Diffs actions to the summary links in the editor sidebar.

Fixes

[edit]
  • Added additional dependencies for foreign pages, especially for Wikidata revisions and media info in Commons.
  • Fixed scrolling to reference anchors when viewing revisions.
  • Fixed mobile responsiveness for the latest MediaWiki versions in Minerva Neue skin.
  • Fixed the hotkey action map for RTL languages.
  • Fixed notification inaccessibility on mobile view.
  • Fixed infinite spinner after committing rollback action in the Page class.
  • Fixed relative links with hashes to be absolute when viewing foreign diffs or revisions.
  • Excluded links with action=edit query parameter from processing.
  • Excluded redirect/page links from processing to prevent overwhelming visual clutter.
  • Fixed regression in legacy MediaWiki versions: 1.39.x.
  • Restored original link titles when hovering over them in some cases.
  • Added a resume process after unload process if a user has returned to the previous page.
  • Fixed mobile diff footer styles in the Minerva Neue skin.

V4.0 (2025-07-29)

[edit]

Updates

[edit]
  • Added support for diffs and revisions from foreign projects (linked to the MediaWikiFarm ); see additional notes in the Integrations section. This required a significant rewrite of all page and navigation actions to support different hostnames, prefixes, etc.
  • Moved translation files to Translatewiki . You can help with translating the project here.
  • Improved performance of requesting the revision's dependencies, which now will not block the View from showing content.
  • Added the Request Manager, which handles all AJAX requests in the View Dialog. All active AJAX requests will now be aborted when the dialog is closing, preventing JavaScript errors and unwanted behaviors.
  • Added the ConfigManager, which handles backup and restoration of mw.config and similar custom Maps of MediaWiki constants.
  • Implemented functionality of the new CheckUser extension.
  • Added ability to watch/unwatch pages in the Actions menu. After the watch status is changed, the current page watchstar status and/or watchlist line statuses are also updated. Render expiry status icon in the watchlist when updating watch/unwatch status.
  • Added a proper deploy script that helps deploy the Instant Diffs bundle on different projects. Adapted from the twinkle-starter repository.
  • Added ability to run Instant Diffs in standalone mode, which can be useful for developers who want to use Instant Diffs as part of their gadget.
  • Added support for Greasemonkey mode, which enables running Instant Diffs from browser script managers.

Settings

[edit]
  • Added a new option to enable keyboard hotkeys.

Projects

[edit]
  • Added support for viewing diffs and revisions from Wikidata as a foreign project in Special:Watchlist and similar special pages.
  • Added support for wikibase and lexeme labels as View Dialog titles when viewing diffs or revisions from Wikidata .
  • Added support for WikiLambda page labels in the Wikifunctions project.

Integrations

[edit]
  • GlobalContributions extension. Implemented viewing foreign diffs and revisions.
  • GlobalWatchlist extension. Implemented viewing foreign diffs. Follows defensive programming when executing external script for the Global Watchlist.
  • Twinkle gadget by AzaToth. Made a PR to the source code. Implemented View Dialog closing when clicking on Twinkle links in it.
  • TwinkleGlobal gadget by Xiplus. Made a PR to the source code. Implemented View Dialog closing when clicking on Twinkle links in it.

Fixes

[edit]
  • Skip links with empty hrefs from adding target blank attributes in the View Dialog.
  • User-specified language attribute will now be added to all API requests where possible.
  • Fixed action button focus loop in the View Dialog.
  • Fixed content visibility in the View Dialog on very heavily loaded DOM. Also hide content of the previous diff or revision before teardown.
  • Purge the local storage cache if the user is running a different version than last time.
  • Always request the inline table diff on mobile view.
  • Fixed prediction of the mobile server hostname before site info request is completed.
  • Fixed displaying LTR content in RTL languages.
  • Fixed a state where document.body is not available yet; ensure the DOM is completely loaded before running Instant Diffs DOM manipulation processes.
  • Fixed inaccessibility of floated elements, like notifications, when the View Dialog is open.

V3.0 (2025-06-30)

[edit]

Updates

[edit]
  • Added lazy-loading of content in the View Dialog, which now will not prevent the window from opening while content is being requested. This significantly improved the opening speed of the View Dialog and optimized resource usage caused by excessive DOM manipulation from OOjs UI internal processes.
  • Added progress bar loader at the top of the View Dialog to indicate the loading process.
  • Added hotkeys to fully navigate the menu via keyboard in the View Dialog. Also added focus restoration on the navigation button after navigating to another diff or revision is completed.
  • Updated the View Dialog dimensions; the window height now always takes all available screen height to prevent the window from jumping around while navigating between diffs or revisions.
  • Implemented functionality of the Visual diffs format toggle button.
  • Implemented functionality of the Inline format toggle button.
  • Implemented AJAX functionality for the patrol and rollback links. These links will no longer open pages in a new tab. The rollback link will now always ask for confirmation.
  • Implemented structured media info for the File namespace in the Revision view.
  • Started migration from nodes rendered by jQuery to hyperscript.
  • Converted translation files to JSON format and added qqq.json file for string definitions.
  • Improved the process of saving setting options and updated the success message when saving options in the Settings Dialog.
  • Added time and info loggers in the browser console for processes inside the View Dialog.

Integrations

[edit]

Fixes

[edit]
  • Restored support for legacy MediaWiki versions.
  • Completely removed jQuery from the main thread that finds links on the page and renders actions.
  • Fixed excessive display of notification popups for critical errors.
  • Fixed the Alt key action for links with the target blank attribute.
  • Fixed settings not being saved for anonymous users.
  • Fixed early leakage of the script code to the global scope before the script was fully initialized.
  • Fixed fallback to English for untranslated strings in other languages.
  • Fixed relative links to be absolute in the messages in the Settings Dialog, so they will navigate to the correct project and website regardless of where Instant Diffs was run.
  • Changed where the Window Manager container is appended to the teleport target (phab:T348286).
  • Restore document scroll position after the View Dialog closes, needed to fix unwanted behavior on mobile devices.
  • Improved styles for the Minerva Neue , MonoBook , Citizen , and Overclocked skins.

V2.0 (2025-06-14)

[edit]

Updates

[edit]
  • Source code of Instant Diffs was moved to the GitHub repository.
  • Single source code file was split into separate self-contained modules, and the code was completely rewritten using ES6+ (ES.Next) language edition and esbuild for bundling.
  • Completely rewrote styles from CSS to LESS language.
  • Designed an official logo and logo assets for Instant Diffs.
  • Rewrote toggle between viewing diff and revision, which now supports navigation in both modes separately.
  • Optimized requests when processing links in user-generated content. Set up an observer that lazily requests required diff or revision content only when links enter the visible area of the screen.
  • Improved parsing and validation of link parts, which improved accuracy in edge cases and user mistakes in formatting links.
  • Optimized link selector assembly that searches for links to process; selectors now also include mobile server variations to cover more user-generated content.
  • Added support for different local special pages that format short links to diffs and revisions, such as Special:Redirect, etc.
  • Improved script interoperability with processed links by changing the link title attribute only when the user hovers over it.
  • Added a change info header that contains usual information such as author name, summary, etc., in the revision view.
  • Improved responsiveness: simplified navigation buttons by showing shorter labels in mobile view, allowing restoration of Snapshot navigation button display.
  • Optimized project-specific dependency configuration and dependency loading in the View Dialog.
  • Show actual revision link instead of timestamp on Minerva on some special pages.
  • Added time and info loggers in the browser console for speed debugging purposes, as well as count of processed links.

Settings

[edit]
  • Added brand-new user interface to customize script settings through a dialog window. This will be referred to as "Settings Dialog" going forward.
  • The script first saves user settings in the local storage of the user's browser. If the user is logged in, the script checks whether the GlobalPreferences extension is installed. If it is, the settings are saved globally across all linked projects. Otherwise, the settings are saved locally on the current project.

Projects

[edit]
  • Improved display of revisions in the Wikidata project.
  • Improved styles for skins used on Fandom sites. Fixed View Dialog being overlapped by the site header; this can now be tweaked by setting a CSS variable for the specific skin if needed.
  • Improved styles for the Overclocked skin and the PCGamingWiki site.

Localization

[edit]
  • Added new localizations for German, Spanish, French, Hebrew, Italian, Polish, and Portuguese language files.

Fixes

[edit]
  • Restore focus on the View Dialog after closing the Settings Dialog.
  • To show diffs and revisions in the user's language, added missing language parameter to requests.
  • Removed back link from the menu when switching between diff and revision.

V1.0 (2025-05-27)

[edit]
  • Script was renamed to "Instant Diffs" following a suggestion from the Wikipedia Discord community to better represent the settled direction of functionality.
  • In response to the global community request, script sources were moved first to Wikimedia Commons, and then to the MediaWiki project, to highlight that the script is ready to be used in external wiki projects.

Updates

[edit]
  • Added an action button (❖ for diffs or ✪ for revisions) after the diff link to open the Instant Diffs dialog, which shows the difference between revisions.
  • Enhanced page action (➔), which now includes the section name as a hash to navigate to the exact section where changes were made.
  • Added support for different local special pages that format short links to diffs and revisions, such as Special:PermanentLink, Special:Diff, etc.
  • Added support for different local special pages where Instant Diffs can run, such as Special:Watchlist, Special:Contributions, Special:RecentChanges, Special:RecentChangesLinked, Special:NewPages, Page History , etc.
  • Added new button "Compare selected revisions" to dynamically compare selected revisions in the Page History.
  • Added row highlights in Watchlist-like special pages when the dialog opens on the corresponding link.
  • Mark links as visited in the Watchlist when the dialog opens on the corresponding link.
  • Added visual marks to the action links that indicate hidden or non-existing revisions and general errors.
  • Added navigation menu in the dialog that enables navigation between diffs and revisions of the chosen page.
  • Added ability to navigate between links on the page to quickly view all diffs posted by users. This feature creates a snapshot of all diff links on the page, enabling sequential navigation through them. This will be referred to as "Snapshot navigation" going forward.
  • Added a context actions menu in the dialog, allowing you to copy the link or an internal wiki link, and navigate to the page, its history, and discussion.
  • Added constant to prevent Instant Diffs from running twice.
  • Added ability to open links in the current tab by pressing Alt+Click instead of opening the Instant Diffs dialog.

Integrations

[edit]
  • Flagged Revisions extension. Displays the "View all pending changes" button in the View Dialog.
  • Convenient Discussions gadget by Jack who built the house. Enhances page action links with hashes that navigate to the corresponding comment where changes were made.
  • wikEdDiff gadget by Cacycle. Implemented using a workaround by resetting the state of the diff table.

Localization

[edit]
  • Added basic support for localizations. Added English and Ukrainian translations.

Fixes

[edit]
  • Optimized dependency loading by making it load on demand (lazy loading).
  • Optimized the main thread that finds links on the page and renders actions by moving most of the code from jQuery to native JavaScript.

V0.0 (2021-07-24)

[edit]
  • Initial release of the prototype (originally named "diffOriginLinks") that explores possibilities for improving the user experience of templates that format diff links.
  • Displays a link to the page where the edit was made, enabling Page Previews popups when hovering over it.