Browse Source

Remove tray menu on restartApplication() (close #10)

tags/v1.2.0
Skylar Ittner 8 months ago
parent
commit
673b8fba4f
2 changed files with 10 additions and 0 deletions
  1. 1
    0
      www/js/main.js
  2. 9
    0
      www/js/platform.js

+ 1
- 0
www/js/main.js View File

@@ -41,6 +41,7 @@ function shadeColor2(color, percent) {
}

function restartApplication() {
removeTrayMenu();
window.location = "index.html";
}


+ 9
- 0
www/js/platform.js View File

@@ -16,6 +16,10 @@ var setTrayMenu = function (items) {

}

var removeTrayMenu = function () {

}

function initCordova() {
platform_type = "cordova";

@@ -78,6 +82,11 @@ function initNW() {
icon: 'www/img/logo_64.png'
});

removeTrayMenu = function () {
nw_tray.remove();
nw_tray = null;
}

setTrayMenu = function (items) {
var menu = new nw.Menu();
menu.append(new nw.MenuItem({

Loading…
Cancel
Save