MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / clearNotifications

Function clearNotifications

src/background/utils/notifications.js:80–96  ·  view source on GitHub ↗
(tabId, frameId, tabRemoved)

Source from the content-addressed store, hash-verified

78}
79
80export function clearNotifications(tabId, frameId, tabRemoved) {
81 for (const nid in openers) {
82 const op = openers[nid];
83 if (isObject(op)
84 && op.tab.id === tabId
85 && (!frameId || op[kFrameId] === frameId)
86 && !op[kZombie]) {
87 if (op[kZombieTimeout]) {
88 op[kZombie] = setTimeout(removeNotification, op[kZombieTimeout], nid);
89 if (!op[kZombieUrl]) openers[nid] = op[kZombie];
90 if (tabRemoved) op._removed = true;
91 } else {
92 removeNotification(nid);
93 }
94 }
95 }
96}
97
98function clearZombieTimer(op) {
99 if (op > 0) clearTimeout(op);

Callers 2

RunFunction · 0.90
clearFrameDataFunction · 0.90

Calls 2

isObjectFunction · 0.85
removeNotificationFunction · 0.85

Tested by

no test coverage detected