-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (83 loc) · 2.6 KB
/
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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>title</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<style>
.content {
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div id="snackbar" class="mdl-js-snackbar mdl-snackbar">
<div class="mdl-snackbar__text"></div>
<button class="mdl-snackbar__action" type="button"></button>
</div>
<div class="content">
<!-- Accent-colored raised button with ripple -->
<button id="show-dialog" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
Begin the rave
</button>
<dialog class="mdl-dialog">
<h4 class="mdl-dialog__title">Are you sure</h4>
<div class="mdl-dialog__content">
<p>
</p>
</div>
<div class="mdl-dialog__actions">
<button id="begin" type="button" class="mdl-button begin">yes</button>
<button type="button" class="mdl-button close">no</button>
</div>
</dialog>
<script>
var dialog = document.querySelector('dialog');
var showDialogButton = document.querySelector('#show-dialog');
if (! dialog.showModal) {
dialogPolyfill.registerDialog(dialog);
}
showDialogButton.addEventListener('click', function() {
dialog.showModal();
});
dialog.querySelector('.close').addEventListener('click', function() {
dialog.close();
});
dialog.querySelector('.begin').addEventListener('click', function() {
dialog.close();
rave();
});
</script>
<script>
(function() {
'use strict';
window['counter'] = 0;
var snackbarContainer = document.querySelector('#snackbar');
var showToastButton = document.querySelector('#begin');
showToastButton.addEventListener('click', function() {
'use strict';
var data = {message: 'Rave has begun'};
snackbarContainer.MaterialSnackbar.showSnackbar(data);
});
}());
</script>
<script>
function rave() {
window.open("https://www.youtube.com/watch?v=jtRFeRFLniY")
while(true) {
moveBy(10, 10)
moveBy(-10, -10)
};
};
</script>
</div>
<div>
</div>
</body>
</html>