From dd95e95b20edc5bbf29dd2aa05eb17ab4b0ce9ad Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 10 Nov 2017 22:48:12 +0100 Subject: [PATCH] Improvement: Update bookmark when setting tile parameters --- src/js/background.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/background.js b/src/js/background.js index ce0ff51..97cff5e 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -500,6 +500,12 @@ app.GridNodes.updateNode = function(gridNode, value, callback){ gridNode.url = value.url; app.GridNodes.refreshNode(gridNode, function(){ browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded }); + var data = { title: gridNode.title }; + if(gridNode.url) data.url = gridNode.url; + browser.bookmarks.onChanged.removeListener(app.Bookmarks._onChanged); + browser.bookmarks.update(gridNode.id, data).then(function(){ + browser.bookmarks.onChanged.addListener(app.Bookmarks._onChanged); + }); }); } app.GridNodes.saveNode(gridNode);