User:Mr. Stradivarius/gadgets/DiffOnly

The DiffOnly gadget adds diff-only links on diff pages. Clicking on the "diff only" link will show you the diff with no page content. These links usually load a lot faster than normal diff links, which can be handy for looking through lots of diffs.

This gadget can also add diff-only links on history pages, Special:RecentChanges, Special:Watchlist, and Special:Contributions, if you enable this behaviour in your configuration.

Note that you can choose to never show the page content when viewing diffs by going to Preferences → Appearance → Diffs, and by selecting the "Do not show page content below diffs" checkbox. This should be preferred over using this gadget if you do not want the option to choose between diffs with and without page content.

Installation
Copy and paste the following code in Special:MyPage/common.js:

Then save the page and bypass your browser cache.

Configuration
By default, diff-only links on diff pages are enabled, but diff-only links on history pages, Special:RecentChanges, Special:Watchlist, and Special:Contributions are disabled. To change this, you can edit the settings for DiffOnly in your Special:MyPage/common.js. You should do this immediately above the  line which loads the gadget. Once you have finished editing your common.js page, save the page, and bypass your browser cache.

Enable all links
To enable diff-only links on diff pages, history pages, Special:RecentChanges, Special:Watchlist, and Special:Contributions, use the following code:

Enable links selectively
To choose which pages you want to enable and disable diff-only links on, use code like the following:

The above example enables diff-only links on history pages, and disables them on diff pages. For a complete list of codes, see below.