From 325fdc8c838a80670219992a6f4c883f6d819d5f Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 15 Oct 2017 11:53:33 +0200 Subject: [PATCH] Bug: Add to Quick Dial menu is missing --- src/js/background.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/js/background.js b/src/js/background.js index c8c8d02..533ede3 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -10,6 +10,7 @@ app.init = function(){ // Init module app.GridNodes.sync(app.node, app.settings.grid.root, function(){ browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded }); app.Bookmarks.initListener(); + app.ContextMenus.initMenu(); }); }); }; @@ -188,11 +189,13 @@ app.ContextMenus.initMenu = function(){ // (Called from app.init) Init context m id: 'AddToQuickDial', title: browser.i18n.getMessage("menuAddToQuickDial"), contexts: ["all"], - documentUrlPatterns: [ 'http://*/*', 'https://*/*', 'file://*/*' ] + documentUrlPatterns: [ 'http://*/*', 'https://*/*', 'file://*/*', 'ftp://*/*' ] }, function(){}); browser.contextMenus.onClicked.addListener(function(info, tab) { // Context menu click event - //if (info.menuItemId == "AddToQuickDial") - //app.GridNodes.createBookmark(app.settings.grid.node, info.pageUrl, tab.title, function(){}); + if (info.menuItemId == "AddToQuickDial") + app.GridNodes.createBookmark(app.node, info.pageUrl, tab.title, function(){ + browser.runtime.sendMessage( { cmd: app.Messages.Commands.gridNodesLoaded } ); + }); }); }