0

I wrote a chrome extension that runs a function called find_agent, on every page load. However, when navigating between the site pages the function is not called again, unless refreshing the destination page. All pages have the same domain.

manifest.js:

{
"name": "FindAgent",
"version": "0.99",
"manifest_version": 2,
"content_scripts" : [
    {
        "matches": ["https://www.[DOMAIN HIDDEN].com/[PATH HIDDEN]*"],
        "js": ["find_agent.js"],
        "css": ["style.css"]
    }
]}

find_agent.js:

function find_agent()
{
   ...
}
window.addEventListener('load', function ()
{
    find_agent()
})
Yoav
  • 999
  • 3
  • 11
  • 30

0 Answers0