-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs7w.js
More file actions
76 lines (63 loc) · 2.01 KB
/
js7w.js
File metadata and controls
76 lines (63 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
window.onload = function () {
console.log('Dokument geladen');
init();
}
function init(){
console.log('initializing');
area1.value = localStorage.getItem('area1');
area2.value = localStorage.getItem('area2');
area3.value = localStorage.getItem('area3');
area4.value = localStorage.getItem('area4');
let numberPlayers
let pts=[];
let BROWSER = "User-agent header sent: " + navigator.appVersion;
datum = new Date();
date.innerHTML = datum;
versionstring = " Version # v"
versionnumber = 0.5;
VERSION.innerHTML = BROWSER+ versionstring+versionnumber;
};
area1.oninput = () => {
localStorage.setItem('area1', area1.value)
}
area2.oninput = () => {
localStorage.setItem('area2', area2.value)
}
area3.oninput = () => {
localStorage.setItem('area3', area3.value)
}
area4.oninput = () => {
localStorage.setItem('area4', area4.value)
}
function sumPTS(number1, number2, number3, number4, number5, number6 , number7) {
let sum = parseInt(number1)+parseInt(number2)+parseInt(number3)+parseInt(number4)+parseInt(number5)+parseInt(number6)+parseInt(number7);
console.log(("Result: "+ sum));
return sum;
}
function updatePTS(index, number) {
pts[index]=number;
output = document.getElementById("output");
console.log(("Results: "+ pts));
//document.getElementById(Result).innerHTML = sum;
}
function calcRnD(cat1, cat2, cat3){
let numSet = (7*(Math.min( cat1, cat2, cat3)));
console.log("points from set: "+ numSet)
let numCat = cat1*cat1 + cat2*cat2 + cat3*cat3;
console.log("points from Cat: "+ numCat)
let numSum = numSet + numCat;
console.log("points from RnD: "+ numSum);
return numSum;
}
function toggleGreenDetail(toggleID) {
let x = document.getElementById(toggleID);
// let view = document.getElementsByClassName('toggleView');
let y = document.getElementById("input7");
if (x.style.display === "none") {
x.style.display = "block";
//y.disabled = true;
} else {
x.style.display = "none";
//y.disabled = false;
}
}