console.log({{My variable}})
instead of console.log("{{My variable}}")
setVariable
functionsetVariable
function in your script:
setVariable
function is only available in script executed on the server, so it won’t work if the Execute on client?
is checked.
console.log
, setTimeout
, setInterval
, etc. are not available
fetch
function behavior is slightly different from the native fetch
function. You just have to skip the await response.text()
or await response.json()
part.
response
will always be a string
even if the the request returns a JSON object. If you know that the response is a JSON object, you can parse it using JSON.parse(response)
.
import
or require
to import external libraries
window
, document
, localStorage
, etc. If you need to use browser APIs, you should check the Execute on client?
option so that the script is executed on the user’s browser.