48 lines
1.9 KiB
JSON
48 lines
1.9 KiB
JSON
{
|
|
"name": "chrome_userscripts",
|
|
"description": "Manage persisted user scripts (full CRUD). Persists/injects user scripts that run on matching pages; a write is persistent code injection. Actions: list (stored scripts: id/name/matches/enabled; bodies only with includeCode), get (full code by id), set (create/update by id?/name/matches/code/world?/enabled? \u2014 persisted and registered so it activates), delete (by id), enable/disable (toggle by id).",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"enum": ["list", "get", "set", "delete", "enable", "disable"],
|
|
"description": "list: stored scripts (no bodies unless includeCode); get: full code by id; set: persistent code injection (create/update); delete: remove by id; enable/disable: toggle by id."
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Userscript id. Required for get/delete/enable/disable; optional for set (omit to create, provide to update)."
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Userscript name (action=set)."
|
|
},
|
|
"matches": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Match patterns the script applies to (e.g. https://*.example.com/*). action=set; defaults to <all_urls>."
|
|
},
|
|
"code": {
|
|
"type": "string",
|
|
"description": "Script source. Required for action=set \u2014 this is persistent code injection that runs on matching pages."
|
|
},
|
|
"world": {
|
|
"type": "string",
|
|
"enum": ["ISOLATED", "MAIN"],
|
|
"description": "Execution world for action=set (default: ISOLATED)."
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Initial enabled state for action=set (default: true)."
|
|
},
|
|
"includeCode": {
|
|
"type": "boolean",
|
|
"description": "action=list: include full script bodies (default: false)."
|
|
}
|
|
},
|
|
"required": ["action"]
|
|
}
|
|
}
|