Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| students:value-calculator-quiz [2024/01/26 02:53] – steve.wang | students:value-calculator-quiz [2024/01/27 01:42] (current) – steve.wang | ||
|---|---|---|---|
| Line 28: | Line 28: | ||
| #tBox{ | #tBox{ | ||
| width: 99.5%; | width: 99.5%; | ||
| + | height: 30%; | ||
| font-size: 600%; | font-size: 600%; | ||
| color: white; | color: white; | ||
| Line 222: | Line 223: | ||
| <!-- https:// | <!-- https:// | ||
| < | < | ||
| - | | + | |
| // -- value-calculator.js | // -- value-calculator.js | ||
| // -------------------------------------------------------------------------- | // -------------------------------------------------------------------------- | ||
| Line 1003: | Line 1004: | ||
| } | } | ||
| //Idea for using & character for passing information inspired by bardAI | //Idea for using & character for passing information inspired by bardAI | ||
| - | |||
| function createLinkWithData (link){ | function createLinkWithData (link){ | ||
| let outputLink = link | let outputLink = link | ||
| answers.forEach(x => { | answers.forEach(x => { | ||
| - | outputLink += '&' | + | outputLink += '&' |
| }) | }) | ||
| // | // | ||
| Line 1042: | Line 1042: | ||
| } | } | ||
| } | } | ||
| - | |||
| window.addEventListener(' | window.addEventListener(' | ||
| Line 1048: | Line 1047: | ||
| let copy = document.getElementsByClassName(' | let copy = document.getElementsByClassName(' | ||
| let navbar = document.getElementsByClassName(" | let navbar = document.getElementsByClassName(" | ||
| - | document.documentElement.appendChild(navbar) | + | let newBody = document.createElement(' |
| - | document.documentElement.appendChild(copy) | + | newBody.appendChild(copy) |
| - | document.body.remove() | + | |
| + | document.body.remove() | ||
| + | document.documentElement.appendChild(newBody) | ||
| copy.style.top = ' | copy.style.top = ' | ||
| + | document.documentElement.style.boxSizing = ' | ||
| + | document.body.style.marginTop = ' | ||
| // | // | ||
| checkReferrer() | checkReferrer() | ||
| Line 1062: | Line 1065: | ||
| question.style.color = ' | question.style.color = ' | ||
| instructions.style.color = ' | instructions.style.color = ' | ||
| - | document.documentElement.style.boxSizing = ' | ||
| </ | </ | ||
| <br> | <br> | ||