MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / GM_setValue

Function GM_setValue

src/app/assets/javascript/GreaseMonkeyAPI.js:38–46  ·  view source on GitHub ↗
(key, value)

Source from the content-addressed store, hash-verified

36 }
37
38 function GM_setValue(key, value) {
39 checkKey(key, "GM_setValue");
40 if (typeof value !== "string" &&
41 typeof value !== "number" &&
42 typeof value !== "boolean") {
43 throw new Error(`GM_setValue requires the value to be of either a string, number, or boolean type, not '${typeof value}'`);
44 }
45 localStorage.setItem(_uuid + key, value);
46 }
47
48 function GM_getValue(name, defaultValue) {
49 checkKey(name, "GM_getValue");

Callers

nothing calls this directly

Calls 2

checkKeyFunction · 0.85
setItemMethod · 0.80

Tested by

no test coverage detected