inject content script to dead pages after reload/upgrade extension
Are You Developing a Chrome Extension ?
Dealing with Content Script brings you Headache ??
You will Need this DEMO !!!
Tired of reloading webpage again and again... before getting extension to work?
Here I make this demo, which includes source code ,a demo interface
,
also a guide on how to use this source code for your own extension code.
------------------------------------------------------
------------------------------------------------------
Actively inject content script after reloading extension.
So developers do not have to ctrl+f5 reload the webpage before getting extension work!
But be careful, the content script left by last version extension still works,
...so there will be 2 content script, old and new one
before you reload the webpage,
If the old content script does not annoy you , also it does not overwrite
new affects,
and all you want is to see the affect of new content script immediately,
then this might be a choice.
#### Notice1
This is only used for developer convenience.
For product, please delete these codes,
and delete unnecessary permissions for security.
#### Notice2:
Force inject is not needed in product version
An important excerpt about OnUpdateAvailable from the developer docs says:
"
Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call chrome.runtime.reload().
Statistics
Installs
1
history
Category
Rating
5.0 (3 votes)
Last update / version
2019-09-12 / 0.0.8
Listing languages