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
22
index.html
22
index.html
|
@ -2,11 +2,14 @@
|
|||
<head>
|
||||
<title>Emulatorjs | Select Game Rom</title>
|
||||
<link rel="icon" type="image/png" href="docs/Emulatorjs Logo.png">
|
||||
<base href="https://allancoding.github.io/emulatorjs-allancoding/">
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
body{
|
||||
background: #c4bdff;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.form{
|
||||
position: absolute;
|
||||
|
@ -37,6 +40,9 @@ body{
|
|||
}
|
||||
.eimg{
|
||||
width: 250px;
|
||||
}
|
||||
#uploadf, #uploadf1{
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
@ -48,10 +54,8 @@ width: 250px;
|
|||
var extension = e.target.files[0].name.split('.').pop()
|
||||
var gameName = e.target.files[0].name.replaceAll("'", "\\'")
|
||||
var gameName = gameName.substr(0, gameName.length - extension.length - 1)
|
||||
e.target.remove()
|
||||
while(document.body.firstChild) {
|
||||
document.body.removeChild(document.body.firstChild);
|
||||
};
|
||||
e.target.remove();
|
||||
document.getElementById('uploadf').style.display = "none"; document.getElementById('uploadf1').style.display = "none";
|
||||
if (['fds', 'nes', 'unif', 'unf'].includes(extension)) {
|
||||
var core = 'nes';
|
||||
} else if (['z64'].includes(extension)) {
|
||||
|
@ -131,11 +135,11 @@ width: 250px;
|
|||
}();
|
||||
};
|
||||
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');
|
||||
b.id = 'game';
|
||||
a.appendChild(b);
|
||||
document.body.appendChild(a);
|
||||
document.getElementById("cont").appendChild(a);
|
||||
var script = document.createElement('script');
|
||||
script.innerHTML = "EJS_player = '#game'; EJS_gameName = '" + gameName + "'; EJS_biosUrl = ''; EJS_gameUrl = '" + gameUrl + "'; EJS_core = '" + core + "'; EJS_pathtodata = 'data/';";
|
||||
document.body.appendChild(script);
|
||||
|
@ -145,10 +149,10 @@ width: 250px;
|
|||
}
|
||||
})
|
||||
</script>
|
||||
<center>
|
||||
<img class="eimg" src="docs/Emulatorjs Logo.png">
|
||||
<center id="cont">
|
||||
<img id="uploadf1" class="eimg" src="docs/Emulatorjs Logo.png">
|
||||
</center>
|
||||
<div class="form">
|
||||
<div id="uploadf" class="form">
|
||||
<input type="file" id="file">
|
||||
<b><p>Select Game Rom: Drag your files here or click in this area.</p></b>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue