From 9ddb14466d8ac98b486e3f46619b8d0d8f6804fa Mon Sep 17 00:00:00 2001 From: zombieFox Date: Sat, 20 Jul 2019 12:24:21 +0100 Subject: [PATCH] [bug] fix mod paths in bookmarks and state module --- src/js/bookmarks.js | 28 ++++++++++++++-------------- src/js/state.js | 4 ++-- src/js/version.js | 2 +- src/manifest.json | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/js/bookmarks.js b/src/js/bookmarks.js index bfd50eb9..a668b7af 100644 --- a/src/js/bookmarks.js +++ b/src/js/bookmarks.js @@ -178,9 +178,9 @@ var bookmarks = (function() { mod.get = function(data) { var _singleBookmark = function() { var found = false; - for (var i = 0; i < all.length; i++) { - if (all[i].timeStamp === data.timeStamp) { - found = all[i]; + for (var i = 0; i < mod.all.length; i++) { + if (mod.all[i].timeStamp === data.timeStamp) { + found = mod.all[i]; }; }; return found; @@ -188,32 +188,32 @@ var bookmarks = (function() { if (data && typeof data.timeStamp == "number") { return _singleBookmark(); } else { - return all; + return mod.all; }; }; mod.restore = function(data) { if ("bookmarks" in data) { - all = data.bookmarks; + mod.all = data.bookmarks; }; }; mod.add = function(data) { - all.push(data); + mod.all.push(data); }; mod.edit = function(data) { - for (var i = 0; i < all.length; i++) { - if (all[i].timeStamp === data.timeStamp) { - all[i] = data; + for (var i = 0; i < mod.all.length; i++) { + if (mod.all[i].timeStamp === data.timeStamp) { + mod.all[i] = data; }; }; }; mod.remove = function(data) { - for (var i = 0; i < all.length; i++) { - if (all[i].timeStamp === data.timeStamp) { - all.splice(all.indexOf(all[i]), 1); + for (var i = 0; i < mod.all.length; i++) { + if (mod.all[i].timeStamp === data.timeStamp) { + mod.all.splice(mod.all.indexOf(mod.all[i]), 1); }; }; }; @@ -230,11 +230,11 @@ var bookmarks = (function() { return helper.sortObject(array, "icon.name"); } }; - all = action[by](all); + mod.all = action[by](mod.all); }; mod.move = function(origin, destination) { - all = helper.moveArrayItem(all, origin, destination); + mod.all = helper.moveArrayItem(mod.all, origin, destination); }; var get = function(data) { diff --git a/src/js/state.js b/src/js/state.js index 27323681..f5903504 100644 --- a/src/js/state.js +++ b/src/js/state.js @@ -221,12 +221,12 @@ var state = (function() { }; mod.get = function() { - return current; + return mod.current; }; mod.restore = function(data) { if ("state" in data) { - current = data.state; + mod.current = data.state; }; }; diff --git a/src/js/version.js b/src/js/version.js index 925760bb..45cff80f 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "3.59.0"; + var current = "3.59.1"; var compare = function(a, b) { var pa = a.split("."); diff --git a/src/manifest.json b/src/manifest.json index 6fe6d70a..0a7bc619 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "nightTab", "short_name": "nightTab", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", - "version": "3.59.0", + "version": "3.59.1", "manifest_version": 2, "chrome_url_overrides": { "newtab": "index.html"