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 19:42] – steve.wang | students:value-calculator-quiz [2024/01/27 01:42] (current) – steve.wang | ||
---|---|---|---|
Line 223: | Line 223: | ||
<!-- https:// | <!-- https:// | ||
< | < | ||
- | | + | |
// -- value-calculator.js | // -- value-calculator.js | ||
// -------------------------------------------------------------------------- | // -------------------------------------------------------------------------- | ||
Line 1004: | 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 1043: | Line 1042: | ||
} | } | ||
} | } | ||
- | |||
window.addEventListener(' | window.addEventListener(' | ||
Line 1051: | Line 1049: | ||
let newBody = document.createElement(' | let newBody = document.createElement(' | ||
newBody.appendChild(copy) | newBody.appendChild(copy) | ||
+ | newBody.appendChild(navbar) | ||
document.body.remove() | document.body.remove() | ||
document.documentElement.appendChild(newBody) | document.documentElement.appendChild(newBody) | ||
- | document.documentElement.appendChild(navbar) | ||
copy.style.top = ' | copy.style.top = ' | ||
document.documentElement.style.boxSizing = ' | document.documentElement.style.boxSizing = ' |