JS Scripts
Apply theme, desktop viewport, custom scripts
1. Apply App Theme
This option injects JavaScript that sets prefers-color-scheme according to
your selected Webview Kiosk theme.
It keeps the webpage theme consistent with the app's theme.
This script runs immediately on page start.
If the theme is the default System, this script is a no-op (does nothing).
Default: true
2. Apply Desktop Viewport Width (px)
This script injects JavaScript code that sets document.meta.content to
width=YOUR_WIDTH_VALUE, simulating web browsing on a Desktop.
JS history state changes will also be subscribed to (e.g. from Single Page Applications), and the script will be re-triggered as needed.
You should only enable this option if setting the user agent was insufficient to force Desktop mode, as the additional JS here will slow down the page.
You may also want to enable the following options under
Settings -> Web Engine:
- User Agent: Desktop
- Use Wide Viewport:
True - Load with Overview Mode:
True - Enable Zoom:
True
To disable, use the value 0.
Minimum: 640
Default: 0
3. Custom Scripts
Your code content will be wrapped as follows to prevent polluting the global scope and avoid conflicts with other scripts:
(function() {
// <YOUR CODE>
})()Example:
document.body.style.backgroundColor = 'green';3.1. On Page Start
JavaScript to run immediately when the page starts loading.
Useful for early DOM manipulation or overriding functions.
Default: (blank)
3.2. On Page Finish
JavaScript to run after the page has fully loaded.
Useful for DOM updates, styling, or injecting behavior.
Default: (blank)