File size: 895 Bytes
68731ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!-- Javascripts -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/diff2html/bundles/js/diff2html-ui.min.js"></script>

<script>
    var oldDiff = "";

    function updateDiffView() {
        try {
            var diff = document.getElementById('diff-raw').innerHTML;
            if (!diff || diff === oldDiff) {
                return;
            }
            oldDiff = diff;
            var targetElement = document.getElementById('diff-view');
            var configuration = {
                drawFileList: true,
                matching: 'lines',
                highlight: true,
                colorScheme: 'light'
            };
            var diff2htmlUi = new Diff2HtmlUI(targetElement, diff, configuration);
            diff2htmlUi.draw();
        } catch (error) {

        }
    }

    setInterval(function () {
        updateDiffView();
    }, 500);
</script>