diff --git a/www/js/platform.js b/www/js/platform.js index 7b0eeff..99b2bd1 100644 --- a/www/js/platform.js +++ b/www/js/platform.js @@ -25,7 +25,7 @@ function initCordova() { } }, false); - openBrowser = function(url) { + openBrowser = function (url) { cordova.InAppBrowser.open(url, '_blank', 'location=yes'); } } @@ -33,9 +33,31 @@ function initCordova() { function initNW() { platform_type = "nw"; - openBrowser = function(url) { + openBrowser = function (url) { nw.Window.open(url, { id: url + }, function (browserwin) { + // Add menubar so the user can navigate around if they click a link + var browsermenu = new nw.Menu({type: 'menubar'}); + browsermenu.append(new nw.MenuItem({ + label: "Back", + click: function () { + browserwin.window.history.back(); + } + })); + browsermenu.append(new nw.MenuItem({ + label: "Forward", + click: function () { + browserwin.window.history.forward(); + } + })); + browsermenu.append(new nw.MenuItem({ + label: "Home", + click: function () { + browserwin.window.location.href = url; + } + })); + browserwin.menu = browsermenu; }); } } diff --git a/www/pages/setup0.html b/www/pages/setup0.html index 65306e8..625b552 100644 --- a/www/pages/setup0.html +++ b/www/pages/setup0.html @@ -41,7 +41,7 @@ Personal