
document.addEventListener('dragover', function(e){
  e.preventDefault();
  e.stopPropagation();
}, false);
document.addEventListener('drop', function(e){
  e.preventDefault();
  e.stopPropagation();
}, false);






  try {
    var gui = require('nw.gui');
    var win = gui.Window.get();
    win.on('new-win-policy', function (frame, url, policy) {
        gui.Shell.openExternal(url);
        policy.ignore();
    });
  } catch(e) { }

function fail() {
    
}
var greenworks_working = !1,
    greenworks = "";
try {
    (greenworks = require("./greenworks")).initAPI(), greenworks_working = !0
    
} catch (e) {
    greenworks_working = !1;
}
if ("undefined" != typeof nw) {
    var win = nw.Window.get();
    win.on("close", function() {
        "undefined" != typeof nw && nw.App.quit(), this.close(!0)
    })
}

function onDeviceReady() {
    localStorage.setItem("saveFlag", "");
    var e = localStorage.getItem("MenuSave");
    "DELETED" != e && "RESTART" != e && void 0 !== cordova.file && null != cordova.file.dataDirectory && null != cordova.file.dataDirectory && window.resolveLocalFileSystemURL(cordova.file.dataDirectory, function(e) {
        e.getFile("OSFileSaves.txt", {
            create: !0
        }, function(e) {
            new FileReader;
            e.file(function(e) {
                var r = new FileReader;
                r.onloadend = function(e) {
                    var r = this.result;
                    if (null != r && "" != r) {
                        var n = r.split("||||");
                        for (i = 0; i < n.length; i++) {
                            var o = n[i].replace("|", ""),
                                a = (o = (o = (o = o.replace("|", "")).replace("|", "")).replace("|", "")).split("~");
                            "" != a[0] && localStorage.setItem(a[0], a[1])
                        }
                    }
                }, r.readAsText(e)
            }, fail)
        })
    })
}
document.addEventListener("deviceready", onDeviceReady, !1);





