Chrome Extension: How to run Javascript on page load (without popup open) -


i have chrome extension word substitutions on pages. have popup opens when click on browser action lets user control whether or not perform substitutions. have background script running sends message content scripts when page refresh happens using chrome.tabs.onupdated event handler.

my problem when refresh page no substitutions made unless popup open (which possible when have inspect elements panel open on popup, because otherwise popup closes when refresh).

has had experience behavior before? additional instrumentation should add diagnose problem? there different extension architecture/code arrangement should using?

thanks in advance!

if use localstorage on given page can store whether or not substitute words. think refreshing page similar opening new tab, script gets reinjected/reloaded rather staying open , receiving onupdate message.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -