content_execute_predefined
Run a predefined external script and execute its JavaScript output in a specified tab, with per-tab/origin consent and profile-scoped IDs.
Instructions
Execute a predefined external script and run its JavaScript output in a tab
Generated JavaScript obeys the extension's per-tab/origin script consent. Each approval prompt expires after 60 seconds; queued tabs wait in turn.
profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
Available scripts:
dom-summarize.sh [onscreen [withpos]]: List the page's visible interactive elements as an indented tree, tagging each with a persistent dsid attribute to select it by later
gcal-cal-event-js.sh "Event Title" day time: In a Google Calendar tab, return one event's details (time, meeting links, attendees, attachments) as JSON
gcal-daily-events-js.sh day [month] [year]: In a Google Calendar tab, return one day's events in time order with RSVP status, as JSON
gcal-monthly-events-js.sh: In a Google Calendar month view, return every event grouped by day, with per-day counts, as JSON
set-file-input.py [file_id, CSS selector]: Assign a file loaded by content_load_file to a page's file input and release its handle
youtube-play-pause.sh [play|pause|toggle]: In a YouTube tab, play, pause or toggle the video and report its state; toggles by default
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab_id | Yes | ID of the tab to execute script in | |
| profile_id | Yes | ||
| script_args | No | JSON array of strings to pass to the external script (e.g., '["arg1", "arg2"]') or empty string for no arguments | |
| script_name | Yes | Name of the script to run, one of those listed above |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |