mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
db79c0129b
commit
e4c2196131
1 changed files with 5 additions and 1 deletions
|
@ -69,13 +69,17 @@
|
||||||
});
|
});
|
||||||
var notifications = [];
|
var notifications = [];
|
||||||
var notificationCounter = {};
|
var notificationCounter = {};
|
||||||
|
var sentAPIs = {};
|
||||||
function notify(data){
|
function notify(data){
|
||||||
if (!settings.ignoredAPIs[data.api]){
|
if (!settings.ignoredAPIs[data.api]){
|
||||||
if (settings.storeNotificationData){
|
if (settings.storeNotificationData){
|
||||||
notifications.push(data);
|
notifications.push(data);
|
||||||
}
|
}
|
||||||
notificationCounter[data.messageId] = (notificationCounter[data.messageId] || 0) + 1;
|
notificationCounter[data.messageId] = (notificationCounter[data.messageId] || 0) + 1;
|
||||||
port.postMessage({"canvasBlocker-notify": data});
|
if (!sentAPIs[data.api]){
|
||||||
|
sentAPIs[data.api] = true;
|
||||||
|
port.postMessage({"canvasBlocker-notify": data});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue