Spaces:
Sleeping
Sleeping
File size: 1,373 Bytes
85b8fdd |
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 32 33 34 35 36 37 38 39 40 41 42 43 |
<!-- Stylesheet -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css"
media="screen and (prefers-color-scheme: light)"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github-dark.min.css"
media="screen and (prefers-color-scheme: dark)"
/>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css"/>
<!-- 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
};
var diff2htmlUi = new Diff2HtmlUI(targetElement, diff, configuration);
diff2htmlUi.draw();
} catch (error) {
}
}
setInterval(function () {
updateDiffView();
}, 500);
</script> |