Kusha Kusha - 1 year ago 120
Javascript Question

Chrome extension Content Script not working

I built a Chrome Extension script that is supposed to run on Reddit.

My script:

console.log("hello world");

My manifest.json

"manifest_version": 2,
"name": "Name",
"description": "Desc",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png"
"content_scripts": [
"matches": [
"js": [
"run_at": "document_end"
"permissions": [
"tabs", "*://reddit.com/*", "activeTab"

The script doesn't show up in the "Content Script" section in the chrome dev tools. Does anyone have an idea why my extension is not running?

Answer Source

"*://reddit.com/*" doesn't match a valid url, you should use "*://*.reddit.com/*"