Fixed option to override 'state' property of a saved machine

This commit is contained in:
Jeff Parsons 2016-02-17 17:50:23 -08:00
commit 4bb7c65208
7 changed files with 132 additions and 10 deletions

View file

@ -55,7 +55,7 @@ function savePC(idMachine, sPCJSFile)
var sState = cmp.powerOff(true);
var sParms = cmp.saveMachineParms();
if (!sPCJSFile) {
if (MAXDEBUG) {
if (DEBUG) {
sPCJSFile = "/tmp/pcjs/" + (XMLVERSION || APPVERSION) + "/pc.js"
} else {
sPCJSFile = "/versions/pcjs/" + (XMLVERSION || APPVERSION) + "/pc" + (dbg? "-dbg" : "") + ".js";
@ -209,7 +209,7 @@ function downloadPC(sURL, sCSS, nErrorCode, aMachineInfo)
}
var link = document.createElement('a');
if (typeof link.download == 'string') {
if (!DEBUG && typeof link.download == 'string') {
link.href = uri;
link.download = sScript + ".json";
document.body.appendChild(link); // Firefox requires the link to be in the body (?)