0

I am trying to make a chrome extension, to help me with a football manager game I am playing. The problem I've encountered is that the extension only works after I refresh the page it's supposed to work on. It goes like this: I go to the page, no extension. I refresh the page, the extension works the way it should. How do I make it work on the first time? Any help is greatly appreciated :)

background.js:

let holder = document.getElementById("el").parentElement;
let table = document.createElement("table");

table.innerHTML = "<tr><th>Change</th><th>Apply</th></tr>" +
"<tr><td id='1'></td><td id='2'></td></tr>";
holder.appendChild(table);

Here is manifest.json:

{
    "name": "Ext name",
    "version": "1.0",
    "description": "desc",
    "content_scripts": [
        {
            "matches": ["*://*.domain.com/clubs/*/tactic"],
            "js": ["/moreTactics.js"],
            "run_at": "document_end"
        }
    ],
    "manifest_version": 3
}
ilko2712
  • 3
  • 4

0 Answers0