Answer the question
In order to leave comments, you need to log in
How to remove caching google extension (content_script)?
Downloaded the extension in developer mode, unpacked. The extension parses page content and uploads it to local storage for further processing. Everything works correctly, except for one thing, it does not run every time I visit a particular page.
I noticed that content_script (cntn.js) works once or even twice.
Manifesto
{
"manifest_version": 2,
"name": "import",
"description": "This extension will import ",
"version": "dfasdas",
"browser_action": {
"default_icon": "32x32.png",
"default_popup": "popup.html"
},
"content_scripts": [
{
"matches": ["https://site/p3/xcxc/fgfg/*/print"],
"js": ["cntn.js"],
"all_frames" : false,
"run_at" : "document_end"
}
],
"background": {
"scripts": ["background.js"]
},
"permissions": [
"activeTab", "storage", "http://localhost:8080/#/", "management", "tabs"
]
}
Answer the question
In order to leave comments, you need to log in
I can answer this question:
very simply, the content of the script is obtained, the content is parsed after completion of DOMContentLoaded (
window.onload = function() {,
document.addEventListener("DOMContentLoaded",,
document.addEventListener("load", function() ,
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question