User:He7d3r/Tools/HighlightSmallDiffs.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// [[File:User:He7d3r/Tools/HighlightSmallDiffs.js]] (workaround for [[phab:T35355]])
/**
* Highlight any diffs which are too small
* @author: Helder (https://github.com/he7d3r)
* @license: CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0/>
*/
// <nowiki>
(function(i,e){"use strict";(i.util.getParamValue("diff")!==null||i.util.getParamValue("action")==="submit")&&e(function(){var i=function(){return e.trim(e(this).text()).length===0};e(".diff-deletedline .diffchange-inline").filter(i).css({background:"#FF7B7B",padding:"0 0.2em"}),e(".diff-addedline .diffchange-inline").filter(i).css({background:"#7BFF7B",padding:"0 0.2em"})})})(mediaWiki,jQuery);
// </nowiki>