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:35] – old revision restored (2024/01/26 00:12) 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 208: | Line 209: | ||
| <div class=" | <div class=" | ||
| <div class=" | <div class=" | ||
| - | <div class=" | + | <div class=" |
| <div class=" | <div class=" | ||
| <div class=" | <div class=" | ||
| - | <div class=" | + | <div class=" |
| <div class=" | <div class=" | ||
| <div class=" | <div class=" | ||
| - | <div class=" | + | <div class=" |
| - | <div class=" | + | <div class=" |
| - | <div id=' | + | <div id=' |
| - | <div class=" | + | <div class=" |
| </ | </ | ||
| <!-- Number pad from w3 schools : https:// | <!-- Number pad from w3 schools : https:// | ||
| <!-- https:// | <!-- https:// | ||
| < | < | ||
| - | | + | |
| // -- value-calculator.js | // -- value-calculator.js | ||
| // -------------------------------------------------------------------------- | // -------------------------------------------------------------------------- | ||
| - | // Code made using Github Copilot and Google Bard | + | // Code made using Github Copilot and Google Bard |
| // Translation helped by Google Translate | // Translation helped by Google Translate | ||
| Line 367: | Line 368: | ||
| return currentQ.join(' | return currentQ.join(' | ||
| } | } | ||
| - | | + | |
| function changeInstructions(type){ | function changeInstructions(type){ | ||
| if (language === ' | if (language === ' | ||
| Line 747: | Line 748: | ||
| // //Each answer is based on 0 to 5 except P is 0 - 5, | // //Each answer is based on 0 to 5 except P is 0 - 5, | ||
| - | //A function that creates a ruler like thing that shows the value of the person. | + | //A function that creates a ruler like thing that shows the value of the person. |
| function showResults () { | function showResults () { | ||
| let results = document.getElementById(' | let results = document.getElementById(' | ||
| 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(' | ||
| if (mode === ' | if (mode === ' | ||
| - | configureStylingForDokuWiki() | + | let copy = document.getElementsByClassName(' |
| + | let navbar = document.getElementsByClassName(" | ||
| + | let newBody = document.createElement(' | ||
| + | newBody.appendChild(copy) | ||
| + | newBody.appendChild(navbar) | ||
| + | document.body.remove() | ||
| + | document.documentElement.appendChild(newBody) | ||
| + | copy.style.top = ' | ||
| + | document.documentElement.style.boxSizing = ' | ||
| + | document.body.style.marginTop = ' | ||
| + | // configureStylingForDokuWiki() | ||
| checkReferrer() | checkReferrer() | ||
| } | } | ||
| Line 1062: | Line 1071: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||