Skip to content

Commit

Permalink
[FIX] Handles icon visibility and fixes context menu with undefined ID
Browse files Browse the repository at this point in the history
  • Loading branch information
SarathSantoshDamaraju committed Aug 12, 2019
1 parent 2ed4a12 commit 137dc4b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions background.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let ContextMenuItem = {
"id": `${Date().now}`,
"id": `RevealURL_Extension`,
"title": "RevealURL",
"contexts": ["link"]
}
Expand All @@ -9,7 +9,7 @@ chrome.contextMenus.create(ContextMenuItem);
// Creates a Status notification
chrome.contextMenus.onClicked.addListener(function (info) {

createNotification('RevealURL', 'Please wait while we get the data', 0)
createNotification('RevealURL', 'Please wait while we get the data', 1)

// API call
var xhr = new XMLHttpRequest();
Expand All @@ -22,7 +22,7 @@ chrome.contextMenus.onClicked.addListener(function (info) {
if (xhr.status === 200) {
handleCallback(xhr.response)
} else {
createNotification('ERROR', 'Please try again later 😓', 1)
createNotification('ERROR', 'Please try again later 😓', 2)
}
}
}
Expand Down Expand Up @@ -65,7 +65,7 @@ function handleCallback(resp) {
url = '😑 Thats not a short URL'
}

createNotification(title, url, 1)
createNotification(title, url, 2)
}

function createNotification(title, message, priority) {
Expand Down
Binary file modified images/icon_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icon_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icon_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RevealURL",
"version": "1.0.2",
"version": "1.0.4",
"description": "Validate any shortURL with RevealURL ",
"permissions": [
"contextMenus",
Expand Down

0 comments on commit 137dc4b

Please sign in to comment.