We use koha-tmpl/intranet-tmpl/lib/jsdiff/jsdiff.js from https://johnresig.com/projects/javascript-diff-algorithm/ for viewing diffs in the log viewer, patron merge, automatic updating of outdated reports, and MARC record diffs in batch imports. Unfortunately, it's a very elegant implementation of a not very robust diff algorithm. The simplest failure to see is that if you move a line from one spot in the thing being diffed to another spot, it won't detect any difference. So if someone changes if (wechecked) { dothething(); } to dothething(); if (wechecked) { } in IntranetUserJS, it will show an empty diff.