commit-labeling / head.html
Petr Tsvetkov
Fix diff2html styles completely. Required inserting the diff2html .css files directly into the app
f8e5276
raw
history blame
894 Bytes
<!-- 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: 'auto'
};
var diff2htmlUi = new Diff2HtmlUI(targetElement, diff, configuration);
diff2htmlUi.draw();
} catch (error) {
}
}
setInterval(function () {
updateDiffView();
}, 500);
</script>