Automatically injects and sends a message in Open WebUI if a `?message=` parameter is present in the URL. Useful for automation, testing, or scripted interactions.
This UserScript is designed to automate message injection and submission in the Open WebUI interface (typically hosted at localhost:3000). When the page is accessed with a ?message= parameter in the URL, the script waits for the chat input field to become available, then automatically pastes the message and simulates pressing the Enter key to send it. This is especially useful for:
message value from the URL query string (?message=Hello+World).[contenteditable="true"] input inside the chat container, it sets its content to the message string.InputEvent to make the change detectable by the frontend app. http://localhost:3000/?message=Hello+World
The script will automatically detect the message parameter and submit it once the input field is available.
localhost:3000: If your Open WebUI is hosted elsewhere, update the @match line accordingly.