diff --git a/dist/js/background.js b/dist/js/background.js index 4802dbb..66758c7 100644 --- a/dist/js/background.js +++ b/dist/js/background.js @@ -1,5 +1,9 @@ -chrome.runtime.onInstalled.addListener(function() { - chrome.storage.local.set({active: 1}, function() { - console.log('Now Active'); +chrome.browserAction.onClicked.addListener(function (tab) { + chrome.tabs.executeScript({ + file: 'dist/js/content.js' }); -}); \ No newline at end of file + chrome.tabs.insertCSS({ + file: 'dist/css/dropdown.min.css' + }); +}); + diff --git a/manifest.json b/manifest.json index a8ebf1f..46eb342 100644 --- a/manifest.json +++ b/manifest.json @@ -6,21 +6,13 @@ "permissions": ["storage", "activeTab"], "background": { "scripts": ["dist/js/background.js"], - "persistent": false + "persistent": true }, "options_page": "dist/options.html", - "page_action": { - "default_icon": { - "32": "favicon.png" - } + "browser_action": { + "default_icon": "favicon.png", + "default_title": "Enable TypeLikeMe Assistant" }, - "content_scripts": [ - { - "matches": [""], - "js": ["dist/js/content.js"], - "css": ["dist/css/dropdown.min.css"] - } - ], "icons": { "32": "favicon.png" }