-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathplayer.html
More file actions
78 lines (67 loc) · 3.25 KB
/
Copy pathplayer.html
File metadata and controls
78 lines (67 loc) · 3.25 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
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
<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">
<title>gamebois</title>
<link rel="icon" type="image/gif" href="/gamebois/imageAssets/gameboislogo512.gif"/>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KDP66SX5Q6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-KDP66SX5Q6');
</script>
<body class = "player">
<script type="text/javascript">
emujstypes = ["nds", "gb", "gbc", "gba"]
const gamename = new URLSearchParams(window.location.search).get('game')
const type = new URLSearchParams(window.location.search).get('type')
const zippedGames = ["nds", "gb", "gbc", "gba"]
var previous = {game:gamename, type:type}
localStorage.setItem('previous', JSON.stringify(previous))
if (emujstypes.includes(type)){
var div = document.createElement("div")
div.className = "game"
div.id = "game"
div.style = "margin:auto; width:1280px; height:960px; max-width:100%; max-height:90%;"
document.body.appendChild(div)
var directory = "games/";
var game = String(directory) + String(type) + "/" + String(gamename) + ".zip"
EJS_oldCores = true;
EJS_startOnLoaded = true;
EJS_color = '#88c070'
EJS_player = '#game';
EJS_biosUrl = '';
EJS_gameUrl = game; // Url to Game rom
EJS_core = type;
EJS_pathtodata = 'data/'; //path to all of the wasm and js files. MUST all be in the same directory!!
//EJS_AdUrl = '' //path to AD page
var player = document.createElement("script")
player.src = "data/loader.js"
document.body.appendChild(player)
} else {
if (type == "web") {
}
if (type == "swf") {
var htmlstring = '<object data="games/swf/'+gamename+'.swf" type="application/x-shockwave-flash" width="100%" height="100%"><param name="movie" value="games/swf/'+gamename+'.swf"><param name="quality" value="high"></object>'
document.body.innerHTML = htmlstring + document.body.innerHTML
var player = document.createElement("script")
player.src = "ruffle/ruffle.js"
document.body.appendChild(player)
}
}
//custom favicon
/*var link = document.querySelector("link[rel~='icon']");
if (!link) {
link = document.createElement('link');
link.rel = 'icon';
document.getElementsByTagName('head')[0].appendChild(link);
}
link.href = 'imageAssets/' + type + '/' + gamename + '.png'; */
</script>
</body>
</html>