MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / getPrefix

Function getPrefix

example/tests/gm_download_test.js:102–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 // ---------- Settings (persisted) ----------
101 // Prefix is the sub-folder under the user's Downloads dir. Trailing slash auto-appended.
102 function getPrefix() {
103 let p = "";
104 try {
105 p = (typeof GM_getValue === "function" ? GM_getValue("dl_prefix", "") : "") || "";
106 } catch { /* ignore */ }
107 if (!p) p = "scriptcat-gmdl-tests/";
108 if (!p.endsWith("/")) p += "/";
109 return p;
110 }
111 function setPrefix(p) {
112 try {
113 if (typeof GM_setValue === "function") GM_setValue("dl_prefix", p);

Callers 3

nameForFunction · 0.85
runAutoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected