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

Function clearValueOpener

src/background/utils/values.js:57–75  ·  view source on GitHub ↗
(tabId, frameId)

Source from the content-addressed store, hash-verified

55});
56
57export function clearValueOpener(tabId, frameId) {
58 if (tabId == null) {
59 toSend = {};
60 }
61 openers::forEachEntry(([id, tabs]) => {
62 const frames = tabs[tabId];
63 if (frames) {
64 if (frameId) {
65 delete frames[frameId];
66 if (isEmpty(frames)) delete tabs[tabId];
67 } else {
68 delete tabs[tabId];
69 }
70 }
71 if (tabId == null || isEmpty(tabs)) {
72 delete openers[id];
73 }
74 });
75}
76
77/**
78 * @param {VMInjection.Script[] | number[]} injectedScripts

Callers 2

storage-cache.jsFile · 0.90
clearFrameDataFunction · 0.90

Calls 1

isEmptyFunction · 0.90

Tested by

no test coverage detected