Reputation: 35194
I would like to run a content script on the site di.se. However, my issue is that it's only executed on the initial page load - not on links clicks (e.g. articles).
I know there are some similar threads out there, but they suggest that the page alters its URL by the window.history.pushState API, which doesn't seems to be the case here, as far as I can tell.
TL;DR: I need your help figuring out why the content script doesn't execute on page links.
manifest.json
{
"manifest_version": 2,
"name": "test",
"description": "test",
"version": "0.1",
"browser_action": {
"default_icon": "icon.png"
},
"permissions": [
"activeTab"
],
"content_scripts": [
{
"matches": ["http://www.di.se/*"],
"js": ["jquery-1.11.3.min.js", "script.js"]
}
]
}
script.js
alert('test');
Upvotes: 0
Views: 694
Reputation: 73526
The site uses frames as you can see in the Inspector.
To autoinsert the content script into all frames add "all_frames": true
as per the documentation:
"content_scripts": [{
"matches": .........,
"js": ..............,
"all_frames": true
}]
Upvotes: 1