Woundorf / foxreplace

Replace text in webpages
https://addons.mozilla.org/firefox/addon/foxreplace/
GNU General Public License v3.0
90 stars 22 forks source link

Substitutions work only on active tab #336

Closed Mattia2510MC closed 2 years ago

Mattia2510MC commented 2 years ago

I have a two monitor setup and I keep the tab that needs FoxReplace on the second monitor. The automatic substitution works only when the tab is active (only when I click on said tab FoxReplace works). I mainly work on the first monitor, so the tab on the second monitor is never active. Could you add an option to make FoxReplace work on all open tab, not only the active/loaded one?

Mattia2510MC commented 2 years ago

Ok found the problem. In foxreplace/scripts/background.js you wrote

function replaceCurrentTab(aMessage) { browser.tabs.query({ currentWindow: true, active: true }).then(tabs => { if (tabs[0]) browser.tabs.sendMessage(tabs[0].id, aMessage); }); }

Would it be possible to add an option to make the script run on all visible tabs or directly on all open tabs?

Woundorf commented 2 years ago

This method only applies to manual and periodic substitutions. Are you referring to periodic substitutions?

Mattia2510MC commented 2 years ago

Yes, I need period substitutions to work on a tab that is open on a second screen. This page is dynamically updated so apply substitutions on page load doesn't work

Woundorf commented 2 years ago

OK, I can modify this to apply to all visible tabs in case of periodic substitutions.

Mattia2510MC commented 2 years ago

Not to be rude, but is there an ETA for this fix? This extension is crucial to me and that's the only thing missing

Woundorf commented 2 years ago

Hopefully soon.

Woundorf commented 2 years ago

I have already done it and released a new version.

Mattia2510MC commented 2 years ago

Thank you!

Commonlist commented 2 years ago

Like!

Nice conversations above.