mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 10:56:30 +00:00
Update index.html
This commit is contained in:
parent
958e684943
commit
b63ca45924
1 changed files with 14 additions and 10 deletions
24
index.html
24
index.html
|
@ -2,11 +2,14 @@
|
||||||
<head>
|
<head>
|
||||||
<title>Emulatorjs | Select Game Rom</title>
|
<title>Emulatorjs | Select Game Rom</title>
|
||||||
<link rel="icon" type="image/png" href="docs/Emulatorjs Logo.png">
|
<link rel="icon" type="image/png" href="docs/Emulatorjs Logo.png">
|
||||||
|
<base href="https://allancoding.github.io/emulatorjs-allancoding/">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<style>
|
<style>
|
||||||
body{
|
body{
|
||||||
background: #c4bdff;
|
background: #c4bdff;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
.form{
|
.form{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -37,6 +40,9 @@ body{
|
||||||
}
|
}
|
||||||
.eimg{
|
.eimg{
|
||||||
width: 250px;
|
width: 250px;
|
||||||
|
}
|
||||||
|
#uploadf, #uploadf1{
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
@ -48,10 +54,8 @@ width: 250px;
|
||||||
var extension = e.target.files[0].name.split('.').pop()
|
var extension = e.target.files[0].name.split('.').pop()
|
||||||
var gameName = e.target.files[0].name.replaceAll("'", "\\'")
|
var gameName = e.target.files[0].name.replaceAll("'", "\\'")
|
||||||
var gameName = gameName.substr(0, gameName.length - extension.length - 1)
|
var gameName = gameName.substr(0, gameName.length - extension.length - 1)
|
||||||
e.target.remove()
|
e.target.remove();
|
||||||
while(document.body.firstChild) {
|
document.getElementById('uploadf').style.display = "none"; document.getElementById('uploadf1').style.display = "none";
|
||||||
document.body.removeChild(document.body.firstChild);
|
|
||||||
};
|
|
||||||
if (['fds', 'nes', 'unif', 'unf'].includes(extension)) {
|
if (['fds', 'nes', 'unif', 'unf'].includes(extension)) {
|
||||||
var core = 'nes';
|
var core = 'nes';
|
||||||
} else if (['z64'].includes(extension)) {
|
} else if (['z64'].includes(extension)) {
|
||||||
|
@ -131,13 +135,13 @@ width: 250px;
|
||||||
}();
|
}();
|
||||||
};
|
};
|
||||||
var a = document.createElement('div');
|
var a = document.createElement('div');
|
||||||
a.style = "width:640px;height:480px;max-width:100%";
|
a.style = "width:60%;height:100%;max-width:100%";
|
||||||
var b = document.createElement('div');
|
var b = document.createElement('div');
|
||||||
b.id = 'game';
|
b.id = 'game';
|
||||||
a.appendChild(b);
|
a.appendChild(b);
|
||||||
document.body.appendChild(a);
|
document.getElementById("cont").appendChild(a);
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.innerHTML = "EJS_player = '#game'; EJS_gameName = '" + gameName + "'; EJS_biosUrl = ''; EJS_gameUrl = '" + gameUrl + "'; EJS_core = '" + core + "'; EJS_pathtodata = 'data/'; ";
|
script.innerHTML = "EJS_player = '#game'; EJS_gameName = '" + gameName + "'; EJS_biosUrl = ''; EJS_gameUrl = '" + gameUrl + "'; EJS_core = '" + core + "'; EJS_pathtodata = 'data/';";
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.src = 'data/loader.js';
|
script.src = 'data/loader.js';
|
||||||
|
@ -145,10 +149,10 @@ width: 250px;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<center>
|
<center id="cont">
|
||||||
<img class="eimg" src="docs/Emulatorjs Logo.png">
|
<img id="uploadf1" class="eimg" src="docs/Emulatorjs Logo.png">
|
||||||
</center>
|
</center>
|
||||||
<div class="form">
|
<div id="uploadf" class="form">
|
||||||
<input type="file" id="file">
|
<input type="file" id="file">
|
||||||
<b><p>Select Game Rom: Drag your files here or click in this area.</p></b>
|
<b><p>Select Game Rom: Drag your files here or click in this area.</p></b>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue