-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
29 lines (29 loc) · 912 Bytes
/
index.html
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
<html>
<head>
<title>lacuneta.github.io</title>
<link rel="icon" href="data:,">
</head>
<body>
<p>NetLogo Web widget click demo.</p>
<iframe id="netlogo-model-frame" src="./NotifyModel.html" width="600" height="600">
</iframe>
<script type="text/javascript">
function wireSurvey() {
const frame = document.getElementById("netlogo-model-frame")
if (frame.contentDocument !== null) {
const button = frame.contentDocument.getElementById("netlogo-button-2")
if (button !== null) {
button.addEventListener("click", () => {
console.log("click!")
window.open("https://ccl.northwestern.edu/netlogo/")
})
return
}
}
// Not done loading? Try again.
setTimeout(wireSurvey, 500)
}
setTimeout(wireSurvey, 500)
</script>
</body>
</html>