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

Function Run

src/background/utils/preinject.js:234–256  ·  view source on GitHub ↗
({ [IDS]: ids, reset }, src)

Source from the content-addressed store, hash-verified

232 };
233 },
234 Run({ [IDS]: ids, reset }, src) {
235 const {
236 [kDocumentId]: docId,
237 [kTop]: isTop,
238 tab: { id: tabId },
239 } = src;
240 const hasIds = +ids?.[0];
241 setBadge(ids, reset, src);
242 if (isTop === 3) {
243 if (hasIds) {
244 reifyValueOpener(ids, docId);
245 updateVisitedTime(ids, true);
246 }
247 reifyRequests(tabId, docId);
248 clearNotifications(tabId);
249 }
250 if (reset === 'bfcache' && hasIds) {
251 addValueOpener(ids, tabId, getFrameDocId(isTop, docId, src[kFrameId]));
252 }
253 if (reset) {
254 setMenus({}, src, reset);
255 }
256 },
257});
258
259hookOptionsInit(onOptionChanged);

Callers

nothing calls this directly

Calls 8

setBadgeFunction · 0.90
reifyValueOpenerFunction · 0.90
updateVisitedTimeFunction · 0.90
reifyRequestsFunction · 0.90
clearNotificationsFunction · 0.90
addValueOpenerFunction · 0.90
getFrameDocIdFunction · 0.90
setMenusFunction · 0.90

Tested by

no test coverage detected