web-ext icon indicating copy to clipboard operation
web-ext copied to clipboard

How to reload content page automatically on Firefox

Open ZiaUrR3hman opened this issue 4 years ago • 1 comments

Is this a feature request or a bug?

feature

What is the current behavior?

I have achieved content page auto reload on chrome by modifying then bgPage script by adding below code. src/extension-runners/chromium.js

chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
    chrome.tabs.reload(tabs[0].id);
});

What is the expected or desired behavior?

How can I auto reload content page on Firefox without pressing R or Reloading manually

ZiaUrR3hman avatar Apr 25 '21 16:04 ZiaUrR3hman

@ZiaUrR3hman at the moment one option you may have is to make it part of the behaviors of the extension being developed (restricted to when it is built for development or maybe when it has been installed temporarily).

In the long run we may be supporting passing more then one extension directory in a web-ext run command (which is a feature request tracked by #1107, recently a contributor expressed his interest to work on it and so hopefully we may be able to support that in one of the next releases), at that point it may become it easier for the extension developers to run their own custom companion extension along with the one being developer (and using the management API events the companion extension may be able to detect when the other extension is being reloaded and reload all the content tabs using something like the snippet mentioned in the issue description).

Another option may be to actually evaluate to add this as an optional behavior of web-ext run itself (web-ext could reload the tabs after the target extension has been reloaded, through the Firefox debugging protocol on Firefox and through the companion extension in chrome).

I'm adding the "enhacement" label and I'll add this issue to our next triage meeting.

rpl avatar Apr 26 '21 14:04 rpl