Chrome DevTools extension loads twice when opened in different tabs
<p>I'm building a Chrome extension in DevTools. It works great unless I open it in another tab. When it is opened in another tab it loads my inserted-script.js file for each instance that the DevTools extension is open. What might be causing this? I'm happy to share what I can, but I'm unsure where to start.</p>

<p>Edit: Here's the manifest.json file:</p>

<pre><code>{
    "name": "My DevTools Thing",
    "version": "0.5",
    "description": "Hello.",
    "devtools_page": "devtools.html",
    "background": {
        "scripts": [
            "js/background.js"
        ]
    },
    "permissions": [
        "activeTab",
        "http://*/*",
        "https://*/*"
    ],
    "web_accessible_resources": [
        "js/content.js"
    ],
    "manifest_version": 2
}
</code></pre>

<p>Edit 2: To add some further context - let's say I have devTools open on tab 1 and all it does it display "Hello!". The first time it's open it displays once.</p>

<p>I then open a new tab, open devTools, then my extension, it shows:</p>

<p>"Hello!"</p>

<p>"Hello!"</p>

<p>On my original tab it has now appended:</p>

<p>"Hello!" (the original)</p>

<p>"Hello!" (from the new tab)</p>

<p>"Hello!" (from the new tab)</p>

<p>If I open a THIRD tab and open the extension...</p>

<p>"Hello!" x 3 (new tab)</p>

<p>The other tabs will have the 3 "Hello!"s from the original appended to it.</p>