From 789d7b4f043191b14c6b078302d9b5a3d07b03a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20M=C3=A4siar?= Date: Fri, 5 Jan 2024 15:39:44 +0100 Subject: [PATCH] - wip, preparing for "smart addon reload" that keeps addon pages opened (including dev console!): https://github.com/mozilla/web-ext/issues/2965 --- .gitignore | 3 +++ package.json | 2 +- src/firefox/remote.js | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ad238d574f..59f2bb83d2 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ dist/* artifacts/* coverage/* lib/ + +# IDE +/.idea/* diff --git a/package.json b/package.json index ab47241732..337d0c6d9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "web-ext", - "version": "7.6.0", + "version": "7.7.0", "description": "A command line tool to help build, run, and test web extensions", "type": "module", "main": "index.js", diff --git a/src/firefox/remote.js b/src/firefox/remote.js index 6e802d1073..662b6e0a56 100644 --- a/src/firefox/remote.js +++ b/src/firefox/remote.js @@ -171,7 +171,9 @@ export class RemoteFirefox { async reloadAddon(addonId) { const addon = await this.getInstalledAddon(addonId); await this.checkForAddonReloading(addon); - await this.addonRequest(addon, 'reload'); + // todo: query opened tabs, filter those with "moz-extension://" URLs, each of them navigate to "about:blank", then reload the addon and then for each of them again call "goBack" + const response = await this.addonRequest(addon, 'reload'); + log.debug('Firefox response:', response); process.stdout.write( `\rLast extension reload: ${new Date().toTimeString()}`, );