mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
1a066de2fd
commit
5e5011f208
16 changed files with 556 additions and 90 deletions
|
@ -68,9 +68,13 @@
|
|||
}
|
||||
});
|
||||
var notifications = [];
|
||||
var notificationCounter = {};
|
||||
function notify(data){
|
||||
if (!settings.ignoredAPIs[data.api]){
|
||||
notifications.push(data);
|
||||
if (settings.storeNotificationData){
|
||||
notifications.push(data);
|
||||
}
|
||||
notificationCounter[data.messageId] = (notificationCounter[data.messageId] || 0) + 1;
|
||||
port.postMessage({"canvasBlocker-notify": data});
|
||||
}
|
||||
}
|
||||
|
@ -154,6 +158,8 @@
|
|||
notice("sending notifications:", notifications);
|
||||
browser.runtime.sendMessage({
|
||||
sender: tabId,
|
||||
url: window.location.href,
|
||||
"canvasBlocker-notificationCounter": notificationCounter,
|
||||
"canvasBlocker-notifications": notifications
|
||||
});
|
||||
notice("notifications sent");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue