-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (36 loc) 路 1.28 KB
/
Copy pathindex.html
File metadata and controls
42 lines (36 loc) 路 1.28 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
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 100vh;
margin: 0;
color: white;
user-select: none;
background: url(/assets/bg.svg) no-repeat center center fixed #1c1c1c;
}
</style>
</head>
<body>
<h1>Double-click!</h1>
<p>Use 'npm run serve'</p>
<script src="dist/winmb.umd.js"></script>
<script>
const random = (list) =>
list[Math.floor((Math.random()*list.length))];
const wmbEngine = new WinMB("./src/assets");
document.addEventListener("dblclick", () => {
const args = random([
["WinMB.js", "A good programmer is someone who always looks both ways before crossing a one-way street.", "info", [{text:"Cancel"}, {text: "OK"}]],
["Hello World!", "I don't always test my code, but when I do, I do it in production.", "error", [{text:"hello"}, {text: "goodbye"}]],
["WinMB.js", "Perl: The only language that looks the same before and after RSA encryption.", "warning"]
])
wmbEngine.show(...args);
})
</script>
</body>
</html>