mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 10:56:30 +00:00
remove lots of unused code
This commit is contained in:
parent
94df031723
commit
e42d2ca9a1
4 changed files with 8403 additions and 13619 deletions
|
@ -5,9 +5,6 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
||||||
window.EJS_RESET_VARS.push(k);
|
window.EJS_RESET_VARS.push(k);
|
||||||
}
|
}
|
||||||
_0x2c1832.r(_0x17edbf);
|
_0x2c1832.r(_0x17edbf);
|
||||||
_0x2c1832(0xa2);
|
|
||||||
_0x2c1832(0x16c);
|
|
||||||
_0x2c1832(0x16d);
|
|
||||||
var _0x39ca5e = {
|
var _0x39ca5e = {
|
||||||
'volume': 0.5,
|
'volume': 0.5,
|
||||||
'muted': false,
|
'muted': false,
|
||||||
|
@ -101,7 +98,6 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
||||||
'tabFocus': 'ejs__tab-focus'
|
'tabFocus': 'ejs__tab-focus'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_0x3d61f9 = _0x2c1832(0x38),
|
|
||||||
_0x5127f4 = _0x2c1832(0x9d),
|
_0x5127f4 = _0x2c1832(0x9d),
|
||||||
_0x48e5ff = _0x2c1832.n(_0x5127f4),
|
_0x48e5ff = _0x2c1832.n(_0x5127f4),
|
||||||
_0x406e79 = function(_0x2aa74f) {
|
_0x406e79 = function(_0x2aa74f) {
|
||||||
|
@ -4074,7 +4070,6 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
||||||
function gotStreams(stream) {
|
function gotStreams(stream) {
|
||||||
_0xa88a13.elements.buttons.screenRecord.getElementsByClassName('ejs--74c6d4176d27e37a19d2e9e61de8f4')[0].innerHTML = _0xa88a13.localization('Stop Screen Recording');
|
_0xa88a13.elements.buttons.screenRecord.getElementsByClassName('ejs--74c6d4176d27e37a19d2e9e61de8f4')[0].innerHTML = _0xa88a13.localization('Stop Screen Recording');
|
||||||
_0xa88a13.recordData.stream = stream;
|
_0xa88a13.recordData.stream = stream;
|
||||||
//_0xa88a13.recordData.stream.addTrack(); // TODO - find audio element
|
|
||||||
_0xa88a13.recordData.recorder = new MediaRecorder(_0xa88a13.recordData.stream, options);
|
_0xa88a13.recordData.recorder = new MediaRecorder(_0xa88a13.recordData.stream, options);
|
||||||
_0xa88a13.recordData.recorder.ondataavailable = function(e) {
|
_0xa88a13.recordData.recorder.ondataavailable = function(e) {
|
||||||
if (e.data.size > 0) {
|
if (e.data.size > 0) {
|
||||||
|
@ -4097,9 +4092,11 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
||||||
_0xa88a13.recordData.started = true
|
_0xa88a13.recordData.started = true
|
||||||
}
|
}
|
||||||
_0x27f4c4.Module.pauseMainLoop();
|
_0x27f4c4.Module.pauseMainLoop();
|
||||||
|
_0xa88a13.playing = false;
|
||||||
alert('please check "share system audio" to have audio in the recording. We only need the audio stream so your entire screen will not be recorded');
|
alert('please check "share system audio" to have audio in the recording. We only need the audio stream so your entire screen will not be recorded');
|
||||||
var canvasStream = _0x27f4c4.Module.canvas.captureStream(30);
|
var canvasStream = _0x27f4c4.Module.canvas.captureStream(30);
|
||||||
var time = setTimeout(function() {
|
var time = setTimeout(function() {
|
||||||
|
_0xa88a13.playing = true;
|
||||||
_0x27f4c4.Module.resumeMainLoop();
|
_0x27f4c4.Module.resumeMainLoop();
|
||||||
}, 20000);
|
}, 20000);
|
||||||
navigator.mediaDevices.getDisplayMedia({
|
navigator.mediaDevices.getDisplayMedia({
|
||||||
|
@ -4114,6 +4111,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
||||||
canvasStream.addTrack(audio[i]);
|
canvasStream.addTrack(audio[i]);
|
||||||
}
|
}
|
||||||
gotStreams(canvasStream);
|
gotStreams(canvasStream);
|
||||||
|
_0xa88a13.playing = true;
|
||||||
_0x27f4c4.Module.resumeMainLoop();
|
_0x27f4c4.Module.resumeMainLoop();
|
||||||
})
|
})
|
||||||
} else if (_0xa88a13.recordData.started) { //stop recording
|
} else if (_0xa88a13.recordData.started) { //stop recording
|
||||||
|
@ -6263,19 +6261,16 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
||||||
split1.push(split3[i])
|
split1.push(split3[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! path.startsWith('/') && path.split('://').length == 1 && path.split('http:').length == 1 && path.split('https:').length == 1 && path.split('file:').length == 1 && path.split('blob:').length == 1) {
|
if (! path.startsWith('/') && path.includes('://') && path.includes('http:') && path.includes('https:') && path.includes('file:') && path.includes('blob:')) {
|
||||||
for (var w=0; w<split2.length; w++) {
|
for (var w=0; w<split2.length; w++) {
|
||||||
if (split2[w] == '' || split2[w] == '.') {
|
if (split2[w] == '' || split2[w] == '.') {
|
||||||
} else if (split2[w] == '..') {
|
} else if (split2[w] == '..') {
|
||||||
if (split1.length > 0) {
|
if (split1.length > 0) {
|
||||||
var split1 = function(origpath) {
|
var split1 = function(origpath) {
|
||||||
var fullrequestpath = origpath
|
if (origpath === '/') {
|
||||||
var finpath = fullrequestpath.split('/').pop()
|
|
||||||
var finalpath = fullrequestpath.substring(0, fullrequestpath.length - finpath.length)
|
|
||||||
if (origpath == '/') {
|
|
||||||
return '/'
|
return '/'
|
||||||
} else {
|
} else {
|
||||||
return finalpath
|
return origpath.substring(0, origpath.length - origpath.split('/').pop().length);
|
||||||
}
|
}
|
||||||
}(split1.join('/')).split('/');
|
}(split1.join('/')).split('/');
|
||||||
}
|
}
|
||||||
|
@ -6580,4 +6575,3 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
||||||
_0x3dbc76.defaults = {};
|
_0x3dbc76.defaults = {};
|
||||||
_0x17edbf.default = _0x3dbc76;
|
_0x17edbf.default = _0x3dbc76;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
data/emu-min.js
vendored
2
data/emu-min.js
vendored
File diff suppressed because one or more lines are too long
21898
data/emulator.js
21898
data/emulator.js
File diff suppressed because one or more lines are too long
104
index.html
104
index.html
|
@ -1,49 +1,49 @@
|
||||||
<html>
|
<html>
|
||||||
<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/Logo.png">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<style>
|
<style>
|
||||||
body{
|
body{
|
||||||
background: #c4bdff;
|
background: #c4bdff;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.form{
|
.form{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 450px;
|
top: 450px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-top: -150px;
|
margin-top: -150px;
|
||||||
margin-left: -250px;
|
margin-left: -250px;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
border: 4px dashed #111;
|
border: 4px dashed #111;
|
||||||
}
|
}
|
||||||
.form p{
|
.form p{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 170px;
|
line-height: 170px;
|
||||||
color: #111;
|
color: #111;
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
}
|
}
|
||||||
.form input{
|
.form input{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
outline: none;
|
outline: none;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
.eimg{
|
.eimg{
|
||||||
width: 250px;
|
width: 250px;
|
||||||
}
|
}
|
||||||
#uploadf, #uploadf1{
|
#uploadf, #uploadf1{
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
document.getElementById('file').onchange = async function(e) {
|
document.getElementById('file').onchange = async function(e) {
|
||||||
|
@ -54,7 +54,7 @@ width: 250px;
|
||||||
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();
|
||||||
document.getElementById('uploadf').style.display = "none"; document.getElementById('uploadf1').style.display = "none";
|
document.getElementById('uploadf').style.display = "none"; document.getElementById('uploadf1').style.display = "none";
|
||||||
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)) {
|
||||||
|
@ -146,12 +146,12 @@ document.getElementById('uploadf').style.display = "none"; document.getElementBy
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<center id="cont">
|
<center id="cont">
|
||||||
<img id="uploadf1" class="eimg" src="docs/Emulatorjs Logo.png">
|
<img id="uploadf1" class="eimg" src="docs/Logo.png">
|
||||||
</center>
|
</center>
|
||||||
<div id="uploadf" 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>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue