From 34b6fb9fc9a72001b80a15c19dc9d6c2e3f3a7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Norman=20Hauk=C3=A5s?= Date: Fri, 25 Sep 2015 16:01:25 +0200 Subject: [PATCH] added manifest.json. And bootstrap. Also added a toggleable button. --- .gitignore | 1 + background.js | 16 ++++++++++++++++ bower.json | 26 ++++++++++++++++++++++++++ icon1.png | Bin 0 -> 77 bytes icon2.png | Bin 0 -> 77 bytes manifest.json | 14 ++++++++++++++ 6 files changed, 57 insertions(+) create mode 100644 .gitignore create mode 100644 background.js create mode 100644 bower.json create mode 100644 icon1.png create mode 100644 icon2.png create mode 100644 manifest.json 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 0000000000000000000000000000000000000000..ea42f3f1d428afc88baa09c982fcb482f549861c GIT binary patch literal 77 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|BAzaeAr*|tf6hBdNgR`MGwsP@ ZVE8j#fKiKeW;IZr!PC{xWt~$(696(`5kLR{ literal 0 HcmV?d00001 diff --git a/icon2.png b/icon2.png new file mode 100644 index 0000000000000000000000000000000000000000..da75c5ff04e5cfdffd1b51caec1c7ad153cd4df7 GIT binary patch literal 77 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|BAzaeAr*|t2|xU$q>f3snf7Ec ZFid>)pE0d0m=P$?;OXk;vd$@?2>>)>5uyM9 literal 0 HcmV?d00001 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 +}