diff --git a/lib/frame.js b/lib/frame.js index 7509cb1..36ae47e 100644 --- a/lib/frame.js +++ b/lib/frame.js @@ -69,13 +69,17 @@ }); var notifications = []; var notificationCounter = {}; + var sentAPIs = {}; function notify(data){ if (!settings.ignoredAPIs[data.api]){ if (settings.storeNotificationData){ notifications.push(data); } 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}); + } } }