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

Function getURI

src/background/sync/base.js:80–92  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

78 return /^vm(?:@\d+)?-/.test(name);
79}
80export function getURI(name) {
81 const i = name.indexOf('-');
82 const [, version] = name.slice(0, i).split('@');
83 if (version === '2') {
84 // uri is encoded by `encodedFilename`, so we should not decode it here
85 return name.slice(i + 1);
86 }
87 try {
88 return decodeURIComponent(name.slice(3));
89 } catch (err) {
90 return name.slice(3);
91 }
92}
93
94function initConfig() {
95 function get(key, def) {

Callers 5

normalizeFunction · 0.90
normalizeFunction · 0.90
normalizeFunction · 0.90
normalizeFunction · 0.90
normalizeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected