Skip to content

Commit

Permalink
Moving {{.Diff}} to div body
Browse files Browse the repository at this point in the history
Signed-off-by: Raj Babu Das <[email protected]>
  • Loading branch information
imrajdas committed Aug 27, 2023
1 parent 7cfc84d commit 70f5052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ const HTML = `<!DOCTYPE html>
</nav>
</br>
<div id="myDiffElement" class="container-left"></div>
<div id="diff-data" data-diff="{{.Diff}}" hidden></div>
<div id="diff-data" hidden>{{.Diff}}</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
var diffString = document.getElementById("diff-data").getAttribute("data-diff");
var diffString = document.getElementById("diff-data").textContent;
document.addEventListener('DOMContentLoaded', function () {
var targetElement = document.getElementById('myDiffElement');
var configuration = {
Expand Down

0 comments on commit 70f5052

Please sign in to comment.