-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathindex.html
31 lines (27 loc) · 1.19 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
<html>
<title> Nintendo DS Emulator - Powered by desmond</title>
<body>
<desmond-player id="player"></desmond-player>
<script src="desmond.min.js"></script>
<script>
document.getElementById("player").loadURL("path-to-game.nds");
</script>
</body>
</html>
<desmond-player></desmond-player>
<input type="file" style="position: absolute; transform: translate(-50%, -50%); left: 50%; top: 95%; color: white;"></input>
<script src="desmond.min.js"></script>
<script>
document.querySelector("input").onchange = function() {
document.querySelector("desmond-player").loadURL(URL.createObjectURL(document.querySelector("input").files[0]))
}
window.onload = function() {
setTimeout(function() {
document.querySelector("desmond-player").loadURL("./path-to-game.nds")
document.querySelector("desmond-player").shadowRoot.querySelector("#top").style = "position: fixed;transform: translate(-50%, -50%);width: 40%;left: 50%;top: 30%;height: 40%;";
document.querySelector("desmond-player").shadowRoot.querySelector("#bottom").style = "position: fixed;transform: translate(-50%, -50%);width: 40%;left: 50%;top: 70%;height: 40%;";
}, 1000)
}
</script>
</body>
</html>