You can create custom JS scripts - globally for the whole website or locally for single page.
It is supported to customize native JS scripts delivered with default Externable template, however it is not recommended to do so as this file may get overwritten with next upgrade. It is recommended to make a copy of the file before applying customizations or use Content Scripts.
Global JS script
Now you can createyour custom script and Save it:
If you want your script to be published, add it to your portal template. You can find more details on it in rendering JS templates section.
Local Content Page JS script