(ems) template cleanup

This commit is contained in:
radius 2016-09-17 02:05:49 -05:00
parent 10222178b0
commit 6f195ddc6d
3 changed files with 8 additions and 48 deletions

View File

@ -3,10 +3,9 @@
*
* This provides the basic JavaScript for the RetroArch web player.
*/
var dropbox = false;
var client = new Dropbox.Client({ key: "--your-api-key--" });
var XFS;
var BrowserFS = browserfs;
var afs;
var showError = function(error) {
switch (error.status) {
@ -73,12 +72,9 @@ function dropboxSyncComplete()
console.log("WEBPLAYER: Sync successful");
setupFileSystem("dropbox");
setupFolderStructure();
preLoadingComplete();
}
var afs;
function dropboxSync(dropboxClient, cb)
{
var dbfs = new BrowserFS.FileSystem.Dropbox(dropboxClient);
@ -162,24 +158,6 @@ function getParam(name) {
}
}
function setupFolderStructure()
{
FS.createPath('/', '/home/web_user', true, true);
}
function stat(path)
{
try{
FS.stat(path);
}
catch(err)
{
console.log("WEBPLAYER: file " + path + " doesn't exist");
return false;
}
return true;
}
function startRetroArch()
{
$('.webplayer').show();
@ -357,7 +335,6 @@ $(function() {
$('#lblLocal').addClass('active');
preLoadingComplete();
setupFileSystem("browser");
setupFolderStructure();
}
});
});

View File

@ -3,9 +3,9 @@
*
* This provides the basic JavaScript for the RetroArch web player.
*/
var dropbox = false;
var client = new Dropbox.Client({ key: "il6e10mfd7pgf8r" });
var BrowserFS = browserfs;
var afs;
var showError = function(error) {
switch (error.status) {
@ -78,12 +78,9 @@ function dropboxSyncComplete()
console.log("WEBPLAYER: Sync successful");
setupFileSystem("dropbox");
setupFolderStructure();
preLoadingComplete();
}
var afs;
function dropboxSync(dropboxClient, cb)
{
var dbfs = new BrowserFS.FileSystem.Dropbox(dropboxClient);
@ -108,7 +105,6 @@ function preLoadingComplete()
});
}
function setupFileSystem(backend)
{
/* create a mountable filesystem that will server as a root
@ -163,24 +159,6 @@ function getParam(name) {
}
}
function setupFolderStructure()
{
FS.createPath('/', '/home/web_user', true, true);
}
function stat(path)
{
try{
FS.stat(path);
}
catch(err)
{
console.log("WEBPLAYER: file " + path + " doesn't exist");
return false;
}
return true;
}
function startRetroArch()
{
$('.webplayer').show();
@ -363,7 +341,6 @@ $(function() {
//$('#icnDrop').removeClass('fa-dropbox');
preLoadingComplete();
setupFileSystem("browser");
setupFolderStructure();
}
});
});

View File

@ -121,6 +121,12 @@ function setupFileSystem(backend)
var lsfs = new BrowserFS.FileSystem.LocalStorage()
/* mount the filesystems onto mfs */
mfs.mount('/home/web_user/retroarch/userdata', lsfs);
/* create a memory filesystem for content only
var imfs = new BrowserFS.FileSystem.InMemory();*/
/* mount the filesystems onto mfs
mfs.mount('/home/web_user/retroarch/userdata/content/', imfs);*/
}
else
{