Hello John,
The Javascript code placed at the "WebExtContent" app's event is the "content" of the WebExtension, that is, the Javascript code which is executed on every loaded page. So, I think you must use this app's event to do the job. When the user changes to another page, by clicking in a link, for example, the "content" Javascript code is executed, so, you can do whatever you need at that point.
Hello John,
Remember that the app and the web extension content run in different contexts. I am not sure if you can set a local storage option from the app to be accessed from the web extension content and viceversa. You can try it, however, because I am not completely sure in this specific case. Anyway, if that is not possible, you always can communicate from the content to the app, so the app read the local storage and send you back the option's value.
Hello John,
How did you do it? Because I try to apply my proposed solution... without lucky... (maybe because more information is needed, for example, where you set the local storage option) and I am here struggling with my mind in order to find another possible workaround... :-(
On WebExtBackground
and in WebExtContent
Hello John,
Glad to know that you got it, sir, and, thanks for sharing your code here!
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.
This website uses some useful cookies to store your preferences.