forked from EmulatorJS/EmulatorJS
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplayer.html
43 lines (36 loc) · 1.33 KB
/
player.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main.css">
<title>Document</title>
</head>
<body>
<div style='width:640px;height:480px;max-width:100%'>
<div id='game'></div>
</div>
<script src="games.json"></script>
<script type='text/javascript'>
var title = new URLSearchParams(window.location.search).get('game')
//var id = new URLSearchParams(window.location.search).get('id')
const json = fetch("games.json")
const games = json.games
var id = games.findIndex((element) => element.title === title);
var game = games[id]
document.title = title
var favicon = document.getElementById("favicon")
favicon.href = "https://thumbnails.libretro.com/Nintendo%20-%20Nintendo%2064/Named_Boxarts/" + title + ".png"
EJS_player = '#game';
EJS_core = game.console;
EJS_startOnLoaded = true;
EJS_color = '#FF0000';
EJS_gameID = id;
// URL to Game rom
EJS_gameUrl = 'roms/' + title + game.filetype;
EJS_pathtodata = 'data/';
</script>
<script src='data/loader.js'></script>
</body>
</html>