Permalink
Browse files

Add sized images for icons

  • Loading branch information...
1 parent 5761c98 commit fcec356ca90f4832a6194296e6db624498f204f2 @wilbertliu committed May 9, 2015
View
@@ -1,4 +1,4 @@
-var hidden_icon_name_html = "<input type='hidden' value='mata-inactive.png' id='mata-icon-name' />";
+var hidden_icon_name_html = "<input type='hidden' value='mata-inactive-38.png' id='mata-icon-name' />";
$("body").append(hidden_icon_name_html);
@@ -14,13 +14,13 @@ chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
// Extension is clicked
if (request.message == "clicked_browser_action") {
// Change the extension's icon name on hidden field
- if ($("#mata-icon-name").val() == "mata-inactive.png") {
- $("#mata-icon-name").val("mata-active.png");
+ if ($("#mata-icon-name").val() == "mata-inactive-38.png") {
+ $("#mata-icon-name").val("mata-active-38.png");
// Activate the mata
activate_mata();
} else {
- $("#mata-icon-name").val("mata-inactive.png");
+ $("#mata-icon-name").val("mata-inactive-38.png");
// Deactivate the mata
deactivate_mata();
@@ -31,7 +31,7 @@ chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
});
$("body").bind("DOMSubtreeModified", function() {
- if ($("#mata-icon-name").val() == "mata-inactive.png") {
+ if ($("#mata-icon-name").val() == "mata-inactive-38.png") {
deactivate_mata();
} else {
activate_mata();
View
@@ -5,8 +5,14 @@
"description": "Reading should be friendly for your eyes",
"version": "0.0.1",
+ "icons": {
+ "16": "mata-inactive-16.png",
+ "48": "mata-inactive-48.png",
+ "128": "mata-inactive-128.png"
+ },
+
"browser_action": {
- "default_icon": { "38": "mata-inactive.png" }
+ "default_icon": { "38": "mata-inactive-38.png" }
},
"background": {
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
File renamed without changes
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fcec356

Please sign in to comment.