Skip to content

Commit

Permalink
update devtool
Browse files Browse the repository at this point in the history
  • Loading branch information
danielruss committed Jun 5, 2024
1 parent 3438314 commit 48db987
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ <h3>Questionnaire Options</h3>
<input class="form-check-input" type="checkbox" role="switch" id="logic" data-sheet-on="ActiveLogic.css" data-sheet-off="Default.css">
</label>
</div>
<div>
<label class="form-check form-switch mt-2">
Hide Markup
<input class="form-check-input" type="checkbox" role="switch" id="hide-markup">
</label>
</div>
</form>
<div class="border flex-grow-1 p-1">
<h3>Previous Results</h3>
Expand Down
20 changes: 6 additions & 14 deletions quest.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,6 @@ async function startUp() {
document.getElementById("pagestyle").setAttribute("href", "Style1.css")
}
}
/*var q = (location.search + location.hash).replace(/[\#\?]/g, "");
if (q.length > 3) {
if (!q.startsWith("config")) {
ta.value = await (await fetch(q.split("&")[0])).text(); // getting the first of markup&css
} else {
moduleParams.config = config;
ta.value = await (await fetch(config.markdown)).text();
}
ta.onkeyup();
}
ta.style.width =
parseInt(ta.parentElement.style.width.slice(0, -1)) - 5 + "%";
*/
document.getElementById("increaseSizeButton").onclick = increaseSize;
document.getElementById("decreaseSizeButton").onclick = decreaseSize;
document.getElementById("clearMem").addEventListener("click",clearLocalForage)
Expand Down Expand Up @@ -221,11 +208,16 @@ document.getElementById("viewCache").addEventListener("click",()=>{

window.onload = function () {
startUp();
document.querySelectorAll('input.form-check-input').forEach( (el) => {
document.querySelectorAll('#logic,#styling').forEach( (el) => {
el.addEventListener("change",(event)=>{
console.log(event.target.id,event.target.checked)
questLF.setItem(event.target.id,event.target.checked)
setStylingAndLogic()
})
})
document.querySelector("#hide-markup").addEventListener("change",(event)=>{
console.log(event.target.checked)
document.getElementById("markup").style.display=(event.target.checked)?"none":"initial"
document.getElementById("renderText").style.display=(event.target.checked)?"none":"initial"
})
};

0 comments on commit 48db987

Please sign in to comment.