-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheventPage.js
More file actions
36 lines (31 loc) · 1002 Bytes
/
eventPage.js
File metadata and controls
36 lines (31 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
chrome.browserAction.onClicked.addListener(ButtonClicked);
function ButtonClicked(tabs){
let message ={
txt:tabs
}
chrome.tabs.sendMessage(tabs.id,message);
}
chrome.runtime.onMessage.addListener(function(request, sender) {
if (request.type == "notification"){
chrome.browserAction.setIcon({
path : "joomla.png",
tabId: sender.tab.id
});
chrome.browserAction.setBadgeText({
text : request.version,
tabId: sender.tab.id
});
chrome.notifications.create('notification', request.options, function() { });
}
if(request.type == "wordpress"){
chrome.browserAction.setIcon({
path : "wordpress.jpg",
tabId: sender.tab.id
});
chrome.browserAction.setBadgeText({
text : request.version,
tabId: sender.tab.id
});
chrome.notifications.create('notificationss', request.options, function() { });
}
});