MCPcopy Create free account
hub / github.com/Tampermonkey/tampermonkey / gotValues

Function gotValues

src/syncinfo.js:255–283  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

253
254 var re = new RegExp(scriptAppendix + '$');
255 var gotValues = function(items) {
256 var ret = [];
257
258 for (var k in items) {
259 if (k.search(re) == -1) continue;
260 var id = k.replace(re, '');
261
262 var j = null;
263 try {
264 if (_syncObjects[k]) {
265 j = JSON.parse(_syncObjects[k]);
266 } else {
267 j = JSON.parse(items[k]);
268 }
269 } catch (e) {}
270 if (!j || !j.url) {
271 if (V) console.log('si: unable to parse extended info of ' + k);
272 continue;
273 }
274 ret.push({ id: id,
275 name: id.replace(/20/g, ' '),
276 url: j.url,
277 options: j.options ? j.options : {}});
278 }
279
280 _lock = false;
281
282 if (callback) callback(ret);
283 };
284
285 _lock = true;
286 chrome.storage.sync.get(null, gotValues);

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…