mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-12-27 17:19:05 +01:00
[bug] improve demo page check
This commit is contained in:
parent
2ec13473e9
commit
6d2380714f
@ -38,6 +38,7 @@ var data = (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);
|
||||
@ -48,6 +49,7 @@ var data = (function() {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
var init = function() {
|
||||
restore();
|
||||
|
15
js/init.js
15
js/init.js
@ -1,10 +1,19 @@
|
||||
// log version
|
||||
if ("runtime" in chrome) {
|
||||
console.log("nightTab version", version.get());
|
||||
} else {
|
||||
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();
|
||||
};
|
||||
|
||||
data.init();
|
||||
state.init();
|
||||
bookmarks.init();
|
||||
|
Loading…
Reference in New Issue
Block a user