(arr, isIds)
| 258 | * @param {boolean} [isIds] |
| 259 | */ |
| 260 | export 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 */ |
| 273 | export function updateScriptMap(key, val) { |
no test coverage detected