(key, value)
| 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"); |