Skip to content

Commit

Permalink
v2: fixes so this works better.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMamen committed Nov 14, 2017
1 parent ef2f9d5 commit c1d87c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions chrome/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ chrome.runtime.onInstalled.addListener(function () {
actions: [new chrome.declarativeContent.ShowPageAction()]
}
]);
chrome.pageAction.onClicked.addListener(function (tab) {
chrome.tabs.sendMessage(tab.id, {greeting: "hello"}, function(response) {
if (localStorage["target"] == "newTab") {
chrome.tabs.create({"url": response.imageUri});
} else {
chrome.tabs.update({"url": response.imageUri});
}
});
});
});
});

chrome.pageAction.onClicked.addListener(function (tab) {
chrome.tabs.sendMessage(tab.id, {greeting: "hello"}, function(response) {
if (localStorage["target"] == "newTab") {
chrome.tabs.create({"url": response.imageUri});
} else {
chrome.tabs.update({"url": response.imageUri});
}
});
});
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Hi-res cover art grabber",
"description": "Retrieves larger versions of cover art on various online stores, like App Store.",
"manifest_version": 2,
"version": "1.8.0",
"version": "2.0.0",
"page_action": {
"default_icon": {
"19": "icons/button-19.png",
Expand Down

0 comments on commit c1d87c8

Please sign in to comment.