From a6c3424b53b6e60386a2496bd561f45db474ff25 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 24 Mar 2017 19:38:02 +0300 Subject: [PATCH] Move images into a separate directory --- help.png => images/help.png | Bin 128.png => images/icon/128.png | Bin 16.png => images/icon/16.png | Bin 16w.png => images/icon/16w.png | Bin 16x.png => images/icon/16x.png | Bin 19.png => images/icon/19.png | Bin 19w.png => images/icon/19w.png | Bin 19x.png => images/icon/19x.png | Bin 32.png => images/icon/32.png | Bin 32w.png => images/icon/32w.png | Bin 32x.png => images/icon/32x.png | Bin 38.png => images/icon/38.png | Bin 38w.png => images/icon/38w.png | Bin 38x.png => images/icon/38x.png | Bin 48.png => images/icon/48.png | Bin world_go.png => images/world_go.png | Bin manifest.json | 15 ++++++++------- messaging.js | 4 ++-- msgbox/msgbox.css | 2 +- 19 files changed, 11 insertions(+), 10 deletions(-) rename help.png => images/help.png (100%) rename 128.png => images/icon/128.png (100%) rename 16.png => images/icon/16.png (100%) rename 16w.png => images/icon/16w.png (100%) rename 16x.png => images/icon/16x.png (100%) rename 19.png => images/icon/19.png (100%) rename 19w.png => images/icon/19w.png (100%) rename 19x.png => images/icon/19x.png (100%) rename 32.png => images/icon/32.png (100%) rename 32w.png => images/icon/32w.png (100%) rename 32x.png => images/icon/32x.png (100%) rename 38.png => images/icon/38.png (100%) rename 38w.png => images/icon/38w.png (100%) rename 38x.png => images/icon/38x.png (100%) rename 48.png => images/icon/48.png (100%) rename world_go.png => images/world_go.png (100%) diff --git a/help.png b/images/help.png similarity index 100% rename from help.png rename to images/help.png diff --git a/128.png b/images/icon/128.png similarity index 100% rename from 128.png rename to images/icon/128.png diff --git a/16.png b/images/icon/16.png similarity index 100% rename from 16.png rename to images/icon/16.png diff --git a/16w.png b/images/icon/16w.png similarity index 100% rename from 16w.png rename to images/icon/16w.png diff --git a/16x.png b/images/icon/16x.png similarity index 100% rename from 16x.png rename to images/icon/16x.png diff --git a/19.png b/images/icon/19.png similarity index 100% rename from 19.png rename to images/icon/19.png diff --git a/19w.png b/images/icon/19w.png similarity index 100% rename from 19w.png rename to images/icon/19w.png diff --git a/19x.png b/images/icon/19x.png similarity index 100% rename from 19x.png rename to images/icon/19x.png diff --git a/32.png b/images/icon/32.png similarity index 100% rename from 32.png rename to images/icon/32.png diff --git a/32w.png b/images/icon/32w.png similarity index 100% rename from 32w.png rename to images/icon/32w.png diff --git a/32x.png b/images/icon/32x.png similarity index 100% rename from 32x.png rename to images/icon/32x.png diff --git a/38.png b/images/icon/38.png similarity index 100% rename from 38.png rename to images/icon/38.png diff --git a/38w.png b/images/icon/38w.png similarity index 100% rename from 38w.png rename to images/icon/38w.png diff --git a/38x.png b/images/icon/38x.png similarity index 100% rename from 38x.png rename to images/icon/38x.png diff --git a/48.png b/images/icon/48.png similarity index 100% rename from 48.png rename to images/icon/48.png diff --git a/world_go.png b/images/world_go.png similarity index 100% rename from world_go.png rename to images/world_go.png diff --git a/manifest.json b/manifest.json index 82530612..1f883cdd 100644 --- a/manifest.json +++ b/manifest.json @@ -6,9 +6,10 @@ "homepage_url": "http://add0n.com/stylus.html", "manifest_version": 2, "icons": { - "16": "16.png", - "48": "48.png", - "128": "128.png" + "16": "/images/icon/16.png", + "32": "/images/icon/32.png", + "48": "/images/icon/48.png", + "128": "/images/icon/128.png" }, "permissions": [ "tabs", @@ -44,10 +45,10 @@ ], "browser_action": { "default_icon": { - "16": "16w.png", - "32": "32w.png", - "19": "19w.png", - "38": "38w.png" + "16": "/images/icon/16w.png", + "32": "/images/icon/32w.png", + "19": "/images/icon/19w.png", + "38": "/images/icon/38w.png" }, "default_title": "Stylus", "default_popup": "popup.html" diff --git a/messaging.js b/messaging.js index 7dcd758f..f3f24364 100644 --- a/messaging.js +++ b/messaging.js @@ -94,9 +94,9 @@ function updateIcon(tab, styles) { chrome.browserAction.setIcon({ path: { // Material Design 2016 new size is 16px - 16: '16' + postfix + '.png', 32: '32' + postfix + '.png', + 16: `/images/icon/16${postfix}.png`, 32: `/images/icon/32${postfix}.png`, // Chromium forks or non-chromium browsers may still use the traditional 19px - 19: '19' + postfix + '.png', 38: '38' + postfix + '.png', + 19: `/images/icon/19${postfix}.png`, 38: `/images/icon/38${postfix}.png`, }, tabId: tab.id }, () => { diff --git a/msgbox/msgbox.css b/msgbox/msgbox.css index e3126d73..eeebb4eb 100644 --- a/msgbox/msgbox.css +++ b/msgbox/msgbox.css @@ -49,7 +49,7 @@ width: 0; height: 0; padding: 0 32px 32px 0; - background: url(/32.png); + background: url('/images/icon/32.png'); display: inline-block; vertical-align: middle; margin-right: .5rem;