diff options
| -rw-r--r-- | background.js | 9 | ||||
| -rw-r--r-- | content.js | 7 | ||||
| -rw-r--r-- | css/.keep | 0 | ||||
| -rw-r--r-- | css/example.com.css | 3 | ||||
| -rw-r--r-- | manifest.json | 14 | 
5 files changed, 32 insertions, 1 deletions
| diff --git a/background.js b/background.js new file mode 100644 index 0000000..44a5c2a --- /dev/null +++ b/background.js @@ -0,0 +1,9 @@ +var browser; + +if (chrome) { +	browser = chrome; +} + +browser.runtime.onMessage.addListener(function() { +	browser.tabs.insertCSS({ file: '/css/example.com.css' }); +}); diff --git a/content.js b/content.js new file mode 100644 index 0000000..bf355f2 --- /dev/null +++ b/content.js @@ -0,0 +1,7 @@ +var browser; + +if (chrome) { +	browser = chrome; +} + +browser.runtime.sendMessage({ url: 'tmp' }); diff --git a/css/.keep b/css/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/css/.keep diff --git a/css/example.com.css b/css/example.com.css new file mode 100644 index 0000000..d7162ed --- /dev/null +++ b/css/example.com.css @@ -0,0 +1,3 @@ +article p { +	font-size: 22px !important; +} diff --git a/manifest.json b/manifest.json index fae4553..a744fb5 100644 --- a/manifest.json +++ b/manifest.json @@ -4,11 +4,23 @@  	"description": "Apply custom CSS to web pages.",  	"version": "0.0.1", +	"content_scripts": [ +		{ +			"matches": [ +				"http://*/*", +				"https://*/*" +			], +			"js": ["content.js"] +		} +	], +  	"background": {  		"scripts": ["background.js"]  	},  	"permissions": [ -		"activeTab" +		"activeTab", +		"http://*/*", +		"https://*/*"  	]  } | 
