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

Function updateVisitedTime

src/background/utils/script.js:260–270  ·  view source on GitHub ↗
(arr, isIds)

Source from the content-addressed store, hash-verified

258 * @param {boolean} [isIds]
259 */
260export function updateVisitedTime(arr, isIds) {
261 const now = Date.now();
262 const toBroadcast = {};
263 const toWrite = {};
264 for (let v of arr) {
265 if (!isIds) v = v.id;
266 scriptSiteVisited[v] = toBroadcast[v] = toWrite[S_MOD_PRE + v] = now;
267 }
268 sendCmd('Visited', toBroadcast);
269 storage.api.set(toWrite);
270}
271
272/** `key` must be already verified to start with S_SCRIPT_PRE */
273export function updateScriptMap(key, val) {

Callers 3

GetInjectedFunction · 0.90
InjectionFeedbackFunction · 0.90
RunFunction · 0.90

Calls 2

sendCmdFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected