MCPcopy Index your code
hub / github.com/violentmonkey/violentmonkey / getScript

Function getScript

src/background/utils/db.js:257–266  ·  view source on GitHub ↗
({ id, uri, meta, removed })

Source from the content-addressed store, hash-verified

255
256/** @return {?VMScript} */
257export function getScript({ id, uri, meta, removed }) {
258 let script;
259 if (id) {
260 script = getScriptById(id);
261 } else {
262 if (!uri) uri = getNameURI({ meta, props: { id: '@@should-have-name' } });
263 script = (removed ? removedScripts : aliveScripts).find(({ props }) => uri === props.uri);
264 }
265 return script;
266}
267
268/** @return {VMScript[]} */
269export function getScripts() {

Callers 4

SetValueStoresFunction · 0.90
GetScriptVerFunction · 0.85
MarkRemovedFunction · 0.85
parseScriptFunction · 0.85

Calls 3

getNameURIFunction · 0.90
getScriptByIdFunction · 0.85
findMethod · 0.80

Tested by

no test coverage detected