diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab079b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bower_components \ No newline at end of file diff --git a/background.js b/background.js new file mode 100644 index 0000000..f0ee4b9 --- /dev/null +++ b/background.js @@ -0,0 +1,16 @@ +var pluginEnabled = true; + +function updateIcon () { + var selectedIcon; + if (pluginEnabled) { + chrome.browserAction.setIcon({path:'icon2.png'}); + pluginEnabled = false; + } else{ + chrome.browserAction.setIcon({path:'icon1.png'}); + pluginEnabled = true; + }; +} + +chrome.browserAction.onClicked.addListener(updateIcon); + +updateIcon(); diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..fb9390a --- /dev/null +++ b/bower.json @@ -0,0 +1,26 @@ +{ + "name": "tag-youre-it", + "version": "0.0.1", + "homepage": "https://github.com/nilsnh/tag-youre-it", + "authors": [ + "Nils Norman Haukås " + ], + "description": "A browser extension for semantic tagging of words", + "main": "main.js", + "keywords": [ + "semantic", + "web", + "tagging" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "bootstrap": "~3.3.5" + } +} diff --git a/icon1.png b/icon1.png new file mode 100644 index 0000000..ea42f3f Binary files /dev/null and b/icon1.png differ diff --git a/icon2.png b/icon2.png new file mode 100644 index 0000000..da75c5f Binary files /dev/null and b/icon2.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..500a5ca --- /dev/null +++ b/manifest.json @@ -0,0 +1,14 @@ +{ + "name": "Tag you're it", + "description": "Make the meaning clear. This plugin enables you to tag words on web sites with semantic meaning.", + "version": "0.7", + "permissions": [""], + "background": { + "persistent": false, + "scripts": ["background.js"] + }, + "browser_action": { + "name": "Click to enable or disable tagging" + }, + "manifest_version": 2 +}