diff --git a/README.md b/README.md index 588449eb..460108b4 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ A neutral new tab page accented with a chosen colour. Customise the layout, styl [See the demo in action](https://zombiefox.github.io/nightTab/) -*All bookmarks or preference changes will not persist in demo mode.* - --- ### [Chrome Extension](https://chrome.google.com/webstore/detail/nighttab/hdpcadigjkbcpnlcpbcohpafiaefanki) diff --git a/js/data.js b/js/data.js index 50fb9e95..898573c6 100644 --- a/js/data.js +++ b/js/data.js @@ -15,16 +15,12 @@ var data = (function() { }; var save = function() { - if ("runtime" in chrome) { - if ("getManifest" in chrome.runtime) { - var data = { - version: version.get(), - state: state.get(), - bookmarks: bookmarks.get() - }; - set(saveName, JSON.stringify(data)); - }; + var data = { + version: version.get(), + state: state.get(), + bookmarks: bookmarks.get() }; + set(saveName, JSON.stringify(data)); }; var wipe = function() { @@ -38,17 +34,15 @@ var data = (function() { var restore = function() { var data = load(); if (data) { - if ("runtime" in chrome) { - if ("getManifest" in chrome.runtime) { - if (!("version" in data) || data.version != version.get()) { - console.log("data version " + data.version + " found less than current"); - data = update.run(data); - set(saveName, JSON.stringify(data)); - } else { - console.log("data version " + version.get() + " no need to run update"); - }; - }; + if (!("version" in data) || data.version != version.get()) { + console.log("data version " + data.version + " found less than current"); + data = update.run(data); + set(saveName, JSON.stringify(data)); + } else { + console.log("data version " + version.get() + " no need to run update"); }; + } else { + console.log("no data found to load"); }; }; diff --git a/js/init.js b/js/init.js index ce2a96a5..22e4ee31 100644 --- a/js/init.js +++ b/js/init.js @@ -1,19 +1,5 @@ // log version -var demoMessage = function() { - console.log("nightTab running in demo mode"); - console.log("all bookmarks or preference changes will not persist in demo mode"); -}; - -if ("runtime" in chrome) { - if ("getManifest" in chrome.runtime) { - console.log("nightTab version", version.get()); - } else { - demoMessage(); - }; -} else { - demoMessage(); -}; - +console.log("nightTab version", version.get()); data.init(); state.init(); bookmarks.init(); diff --git a/js/version.js b/js/version.js index 6bf0a957..32c22bf2 100644 --- a/js/version.js +++ b/js/version.js @@ -1,5 +1,7 @@ var version = (function() { + var current = "3.14.0"; + var compare = function(a, b) { var pa = a.split("."); var pb = b.split("."); @@ -23,7 +25,8 @@ var version = (function() { }; var get = function() { - return chrome.runtime.getManifest().version; + // return chrome.runtime.getManifest().version; + return current; }; // exposed methods