[bug] fix mod paths in bookmarks and state module

This commit is contained in:
zombieFox 2019-07-20 12:24:21 +01:00
parent 7630486a98
commit 9ddb14466d
4 changed files with 18 additions and 18 deletions

View File

@ -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) {

View File

@ -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;
};
};

View File

@ -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(".");

View File

@ -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"