For custom scripts to work, you either have to test your content on a device or allow it in preview for the content.
In the browser preview, open the console (F12 in Chrome) and locate this message:
Right-click the ”f” and choose ”Store as global variable”.
Now you can run it by typing “temp1()” to the console.
Hit enter and refresh the content.