Add kiosk.js
file with the content below to your www
folder in config.
Like any other custom script, use ui-lovelace.yaml
resources section to reference the kiosk.js
file.
Make sure you add kiosk
somewhere in your URL. You can use it in the id of your view or in the query string.
Examples:
/lovelace/0?kiosk
views:
- title: Kiosk
icon: mdi:heart
id: kiosk_alarm
If this is your first file in www
make sure you restart Home Assistant.
OK, your URL is fine. Here are the important lies in the ui-lovelace.yaml:
Make sure the file you have downloaded is the latest kiosk.js file and appears in the www directory. I have attached the correct version to use - just delete the jpg extension!

Under the resources heading it should look something like this, make sure you don't have two resources headings! The first two are form my config, the last one is the one you should add. My resource heading is just under the "dark mode" section that sets the default colours for the UI.
#Include external resources
resources:
type: js
type: css
type: js
Next make sure your browser zoom is correct, try changing it.
Finally
REBOOT THE SERVER! Very important, especially if you've not got anything in the www directory (parent is config)