From 9ea98971e5d58ec2bafd62d4bf96997def53ccc7 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Thu, 27 Dec 2018 11:41:40 -0700 Subject: [PATCH] [feature] adding version count --- js/data.js | 4 ++-- js/init.js | 1 + js/version.js | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 js/version.js diff --git a/js/data.js b/js/data.js index 4f9f6592..6f52b341 100644 --- a/js/data.js +++ b/js/data.js @@ -16,7 +16,7 @@ var data = (function() { var save = function() { set(saveName, JSON.stringify(state.get())); - console.log(saveName + " data saved"); + console.log("data saved"); }; var restore = function() { @@ -25,7 +25,7 @@ var data = (function() { bookmarks.restore(data.bookmarks); theme.restore(data.theme); control.restore(data.control); - console.log(saveName + " data restored"); + console.log("data restored"); }; }; diff --git a/js/init.js b/js/init.js index a56cced6..fb40658b 100644 --- a/js/init.js +++ b/js/init.js @@ -1,3 +1,4 @@ +console.log("nightTab v", version.get(), "loaded"); // look for and restore data data.init(); // render theme diff --git a/js/version.js b/js/version.js new file mode 100644 index 00000000..e83adf7a --- /dev/null +++ b/js/version.js @@ -0,0 +1,14 @@ +var version = (function() { + + var current = 1.0; + + var get = function() { + return current; + }; + + // exposed methods + return { + get: get + }; + +})();