mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-04-18 08:08:28 +02:00
parent
db79c0129b
commit
e4c2196131
@ -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…
x
Reference in New Issue
Block a user