tell me the current API commands in here please <!DOCTYPE html> <html lang="en" > <head>…
- User
tell me the current API commands in here please
Likes & Playlists
API Mode
- Assistant
tell me the current API commands in here please
Likes & Playlists
API Mode
The current API commands available in the developer console API mode (as implemented in the runInternalAPICommands function) are:
goto(page)
Navigate to a UI panel or page specified by the string page.
Valid values for page are:
'gamePage1''gamePage2''youtubeEmbedUI''consoleUI''settingsUI''none' (hides all panels)api.goto('gamePage1');
toggle(panel)
Toggles visibility of a UI panel or feature.
Supported panels:
'darkMode' (toggles dark mode)'settingsUI''youtubeEmbedUI''consoleUI'api.toggle('darkMode');
api.toggle('settingsUI');
gamesList()
Returns a string listing all the games available on page 1 and 2 with their names and links.
Example:
api.gamesList();
playVideo(videoID)
Plays a YouTube video by embedding it in the player using the specified YouTube video ID string.
Example:
api.playVideo('dQw4w9WgXcQ');
likeVideo(videoID)
Marks a YouTube video as liked within the app by ID (adds it to the internal liked videos list and updates storage/UI).
Example:
api.likeVideo('dQw4w9WgXcQ');
showToast(message, type = 'info')
Shows a toast notification with the given message and optional type. Available types include 'info', 'success', and 'error'.
Example:
api.showToast('Hello world!', 'success');
addButton(label, parent = 'ytControlButtons', callbackName = null)
Dynamically adds a button with label text to a parent element with the specified ID (default is 'ytControlButtons'), optionally calling an API command callbackName when clicked.
Example:
api.addButton('My Button');
api.addButton('Like Video', 'ytControlButtons', 'likeVideo');
These commands are invoked inside the console UI in API mode as JavaScript expressions using the api object, e.g.:
api.goto('consoleUI')
api.playVideo('VIDEO_ID')
The code running these commands limits the execution to this internal API and prevents unauthorized code from accessing other parts of the app.
The console UI supports two evaluation modes:
If you want a quick extracted list of the commands with signatures:
api.goto(page: string) // Navigate UI to page/panel
api.toggle(panel: string) // Toggle dark mode or panels
api.gamesList(): string // Get list of games as text
api.playVideo(videoID: string) // Play YouTube video by ID
api.likeVideo(videoID: string) // Like video by ID
api.showToast(msg: string, type?: string) // Show toast notification
api.addButton(label: string, parent?: string, callbackName?: string) // Add button to UI
If you want me to help with examples or further details on how to use these commands in the console, just ask!
Not yet included in a published release.