├── background.js ├── style.css └── manifest.json /background.js: -------------------------------------------------------------------------------- 1 | chrome.browserAction.onClicked.addListener(function (tab) { 2 | chrome.tabs.insertCSS(tab.id, {file: "style.css"}, function () {}); 3 | }); 4 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 40px auto; 3 | max-width: 650px; 4 | line-height: 1.6; 5 | font-size: 18px; 6 | color: #444; 7 | padding: 0 10px; 8 | } 9 | 10 | h1, h2, h3 { 11 | line-height: 1.2 12 | } -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Better Website", 4 | "description": "Inject a minimal CSS to enhance website look", 5 | "version": "1.0", 6 | "browser_action": { 7 | "default_title": "Better Website" 8 | }, 9 | "background": { 10 | "scripts": [ "background.js" ], 11 | "persistent": false 12 | }, 13 | "permissions": [ 14 | "activeTab" 15 | ] 16 | } 17 | --------------------------------------------------------------------------------