students:value-calculator-quiz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
students:value-calculator-quiz [2024/01/26 19:42] steve.wangstudents:value-calculator-quiz [2024/01/27 01:42] (current) steve.wang
Line 223: Line 223:
 <!-- https://www.w3schools.com/css/css_grid.asp --> <!-- https://www.w3schools.com/css/css_grid.asp -->
         <script>         <script>
-        // --------------------------------------------------------------------------+            // --------------------------------------------------------------------------
 // -- 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 += '&' + x.name + '&' + x.score+        outputLink += '&' + x.name.replace(/ /g, "-"+ '&' + x.score
     })     })
 //     return link + '&'  + answers[0].name + '&' + answers[0].score + '&' + answers[1].name + '&' + answers[1].score //     return link + '&'  + answers[0].name + '&' + answers[0].score + '&' + answers[1].name + '&' + answers[1].score
Line 1043: Line 1042:
     }     }
 } }
- 
  
 window.addEventListener('load', function() { window.addEventListener('load', function() {
Line 1051: Line 1049:
         let newBody = document.createElement('body')         let newBody = document.createElement('body')
         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 = '20%'         copy.style.top = '20%'
         document.documentElement.style.boxSizing = 'none'         document.documentElement.style.boxSizing = 'none'
  • students/value-calculator-quiz.1706326966.txt.gz
  • Last modified: 2024/01/26 19:42
  • by steve.wang