Skip to content

Commit

Permalink
This PR fixes the bug that was causing the ML kit help-guide to not a…
Browse files Browse the repository at this point in the history
…ppear
  • Loading branch information
Akhilesh-max committed Mar 5, 2024
1 parent 55d8db2 commit fcec7cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/dev-workbench/workbench.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
href="#"
data-toggle="modal"
data-target="#helpModal"
onClick="displayUserGuide()"
>
<i class="fas fa-question-circle"></i>
&nbsp;&nbsp;Help/User Guide</a
Expand Down
6 changes: 3 additions & 3 deletions apps/dev-workbench/workbench.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,14 @@ function importWork() {
}

// getting markdown from readme.md and parsing/displaying it as user-guide
$('.helpButton').click(function() {
function displayUserGuide() {
fetch('./readme.md').then((res) => res.blob()).then((blob) => {
let f = new FileReader();
f.onload = function(e) {
$('#helpModal .modal-body').html(marked(e.target.result));
$('#helpModal .modal-body').html(marked.marked(e.target.result));
$('#helpModal .modal-body td, #helpModal .modal-body th')
.css('border', '2px solid #dddddd').css('padding', '5px');
};
f.readAsText(blob);
});
});
}

0 comments on commit fcec7cc

Please sign in to comment.