From a7ba1792a3539d5e6f7958261a429525669bba1a Mon Sep 17 00:00:00 2001 From: Nguyen Kim Kha Date: Tue, 4 Nov 2014 23:38:38 +0700 Subject: [PATCH] #7 Refactor files --- src/{ => icons}/icon128.png | Bin src/{ => icons}/icon16.png | Bin src/{ => icons}/icon19.png | Bin src/{ => icons}/icon48.png | Bin src/manifest.json | 12 ++++++------ src/popup.html | 4 ++-- src/{ => scripts}/avim.js | 0 src/{ => scripts}/background.js | 2 -- src/{ => scripts}/popup.js | 0 9 files changed, 8 insertions(+), 10 deletions(-) rename src/{ => icons}/icon128.png (100%) rename src/{ => icons}/icon16.png (100%) rename src/{ => icons}/icon19.png (100%) rename src/{ => icons}/icon48.png (100%) rename src/{ => scripts}/avim.js (100%) rename src/{ => scripts}/background.js (96%) rename src/{ => scripts}/popup.js (100%) diff --git a/src/icon128.png b/src/icons/icon128.png similarity index 100% rename from src/icon128.png rename to src/icons/icon128.png diff --git a/src/icon16.png b/src/icons/icon16.png similarity index 100% rename from src/icon16.png rename to src/icons/icon16.png diff --git a/src/icon19.png b/src/icons/icon19.png similarity index 100% rename from src/icon19.png rename to src/icons/icon19.png diff --git a/src/icon48.png b/src/icons/icon48.png similarity index 100% rename from src/icon48.png rename to src/icons/icon48.png diff --git a/src/manifest.json b/src/manifest.json index e5c4dbf..9983b29 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,17 +3,17 @@ "version": "0.7", "manifest_version": 2, "description": "__MSG_extDescription__", - "icons": { "16": "icon16.png", - "48": "icon48.png", - "128": "icon128.png" + "icons": { "16": "icons/icon16.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" }, "browser_action": { - "default_icon": "icon19.png", + "default_icon": "icons/icon19.png", "default_title": "__MSG_extAction__", "default_popup": "popup.html" }, "content_scripts": [{ - "js": [ "avim.js" ], + "js": [ "scripts/avim.js" ], "matches": ["http://*/*", "https://*/*"], "run_at": "document_idle", "all_frames": true @@ -21,7 +21,7 @@ "default_locale": "en", "offline_enabled": true, "background": { - "scripts": ["background.js"] + "scripts": ["scripts/background.js"] }, "permissions": [ "tabs", "storage" diff --git a/src/popup.html b/src/popup.html index 92bd71c..8e67879 100644 --- a/src/popup.html +++ b/src/popup.html @@ -21,7 +21,7 @@ - - + + diff --git a/src/avim.js b/src/scripts/avim.js similarity index 100% rename from src/avim.js rename to src/scripts/avim.js diff --git a/src/background.js b/src/scripts/background.js similarity index 96% rename from src/background.js rename to src/scripts/background.js index 6f588da..4348353 100644 --- a/src/background.js +++ b/src/scripts/background.js @@ -62,11 +62,9 @@ var bg = {}; if (prefs.onOff == 1) { - //chrome.browserAction.setIcon({path:"icon19.png"}); txt.text = "on"; bg.color = [0, 255, 0, 255]; } else { - //chrome.browserAction.setIcon({path:"icon19-off.png"}); txt.text = "off"; bg.color = [255, 0, 0, 255]; } diff --git a/src/popup.js b/src/scripts/popup.js similarity index 100% rename from src/popup.js rename to src/scripts/popup.js