From f969ee3fdc8ad4fb0d6777eaeadf4a7edc69c457 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 4 Mar 2020 18:19:35 +0100 Subject: [PATCH] Update refresh tab after save options (Chrome) Synch with Chrome-extension code (after earlier added tabs-permission (manifest.json)). --- options.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/options.js b/options.js index 15af17b..08afa53 100644 --- a/options.js +++ b/options.js @@ -27,7 +27,14 @@ function save_options() { }); // Refresh the current tab - browser.tabs.reload({bypassCache: true}); + browser.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + browser.tabs.update(tabs[0].id, { + url: tabs[0].url + }); + }); } // Restores checkbox input states using the preferences stored in browser.storage.