Cordova launcher formatting

This commit is contained in:
Alex Shpak 2017-03-29 00:25:16 +02:00
parent ad246ba180
commit 1b6ecd1e70
1 changed files with 9 additions and 23 deletions

View File

@ -15,9 +15,7 @@ const Launcher = {
},
devTools: false,
// openDevTools: function() { },
getSaveFileName: function(defaultPath, callback) {
// Not in cordova
},
getSaveFileName: function(defaultPath, callback) { /* skip in cordova */ },
getDataPath: function() {
const storagePath = window.cordova.file.externalDataDirectory;
return [storagePath].concat(Array.from(arguments)).filter(s => !!s);
@ -128,15 +126,11 @@ const Launcher = {
exit: function() {
this.hideApp();
},
requestExit: function() {
// skip in cordova
},
requestExit: function() { /* skip in cordova */ },
requestRestart: function() {
window.location.reload();
},
cancelRestart: function() {
// skip in cordova
},
cancelRestart: function() { /* skip in cordova */ },
setClipboardText: function(text) {
return document.execCommand('copy');
},
@ -150,27 +144,19 @@ const Launcher = {
this.hideApp();
},
canMinimize: function() {
return true;
return false;
},
updaterEnabled: function() {
return false;
},
// getMainWindow: function() { },
resolveProxy: function(url, callback) {
// skip in cordova
},
openWindow: function(opts) {
// skip in cordova
},
hideApp: function() { // home button
// TODO
},
resolveProxy: function(url, callback) { /* skip in cordova */ },
openWindow: function(opts) { /* skip in cordova */ },
hideApp: function() { /* skip in cordova */ },
isAppFocused: function() {
return false; // skip in cordova
},
showMainWindow: function() {
// skip in cordova
return false; /* skip in cordova */
},
showMainWindow: function() { /* skip in cordova */ },
// spawn: function(config) { },
openFileChooser: function(callback, button) {
const onFileSelected = function(selected) {