From 3df9364b26726c52a1b50f372083d295feb63a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Norman=20Hauk=C3=A5s?= Date: Fri, 25 Sep 2015 17:10:39 +0200 Subject: [PATCH] plugin now injects both jquery and bootstap into the page. --- background.js | 4 ++-- content_script.js | 1 + manifest.json | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 content_script.js diff --git a/background.js b/background.js index f0ee4b9..b4fbddc 100644 --- a/background.js +++ b/background.js @@ -5,10 +5,10 @@ function updateIcon () { if (pluginEnabled) { chrome.browserAction.setIcon({path:'icon2.png'}); pluginEnabled = false; - } else{ + } else { chrome.browserAction.setIcon({path:'icon1.png'}); pluginEnabled = true; - }; + } } chrome.browserAction.onClicked.addListener(updateIcon); diff --git a/content_script.js b/content_script.js new file mode 100644 index 0000000..526b86c --- /dev/null +++ b/content_script.js @@ -0,0 +1 @@ +console.log('hello world!'); diff --git a/manifest.json b/manifest.json index 500a5ca..06fd28e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,14 +1,22 @@ { "name": "Tag you're it", - "description": "Make the meaning clear. This plugin enables you to tag words on web sites with semantic meaning.", + "description": "Make the meaning clear. This plugin enables semantic tagging of web content.", "version": "0.7", "permissions": [""], "background": { "persistent": false, "scripts": ["background.js"] }, + "content_scripts": [{ + "matches": [""], + "css": ["bower_components/bootstrap/dist/css/bootstrap.min.css"], + "js": [ + "bower_components/jquery/dist/jquery.min.js", + "bower_components/bootstrap/dist/js/bootstrap.min.js", + "content_script.js"] + }], "browser_action": { - "name": "Click to enable or disable tagging" - }, - "manifest_version": 2 + "default_title": "Tag you're it! Click to enable or disable tagging of web content." + }, + "manifest_version": 2 }