forked from Team2890HawkCollective/pitWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalerts.js
More file actions
28 lines (24 loc) · 804 Bytes
/
Copy pathalerts.js
File metadata and controls
28 lines (24 loc) · 804 Bytes
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
function updatoAlerto () {
let doc = document.getElementById("settings"); //gets the settings form
//populates data from form
teamNumber = doc.elements[0].value;
eventKey = doc.elements[1].value;
slackAPI = doc.elements[2].value;
slackChannel = doc.elements[3].value;
matchNumber = doc.elements[4].value;
willDisplayData = doc.elements[5].checked;
slackReader();
storeUsers();
updateInspection();
}
/**
* Replaces src or embed to update to proper pit page
*/
function updateInspection()
{
var eventName = "http://www.gafirst.org/peachpits/pitmap?event=" + eventKey;
var embed = document.getElementById("inspectionStatus");
var copy = embed.cloneNode(true);
copy.setAttribute('src', eventName);
embed.parentNode.replaceChild(copy, embed);
}