-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Description
scriptcat/src/app/service/content/gm_api.ts
Lines 183 to 195 in cb8edf7
| public GM_setValue(key: string, value: any) { | |
| // 对object的value进行一次转化 | |
| if (typeof value === "object") { | |
| value = JSON.parse(JSON.stringify(value)); | |
| } | |
| if (value === undefined) { | |
| delete this.scriptRes.value[key]; | |
| return this.sendMessage("GM_setValue", [key]); | |
| } else { | |
| this.scriptRes.value[key] = value; | |
| return this.sendMessage("GM_setValue", [key, value]); | |
| } | |
| } |
undefined 當作刪鍵的話
listValues的結果會不一樣吧
(還有GM_setValue 不應回傳任何東西)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels