Insert <script/>
tag
To customize and expand the functionality of your website or add resources, you can add your own custom <script/>
tags by handwriting them or importing an external link as a resource containing a script.
‼️‼️ Check the safety of a script ‼️‼️
Scripts execute arbitrary code on your website. If you are writing a script or injecting external packages, you should ALWAYS ensure before publishing that they are not executing malicious code and that the external links are safe. Read the code injection security best practices guide
Add a <script/>
tag
To add your own <script/>
tag with your custom classes, follow these steps:
- Open the Websites application in RevasOS;
- Click Settings;
- Click Custom code injection and start typing in the Custom code <\head> tag field or the Custom code <\body> tag field the tag with the classes, with a structure similar to this:
html
<script><!-- some code and logic --></script>
- When you are done, make sure you know where the code comes from and how it works to ensure its safety. Once checked, select the Code is safe checkbox and then the Update custom code button to apply the code.
Connect an external script.
To add your external script or package make sure you have it available on a public link then follow these steps:
- Open the Websites application in RevasOS;
- Click Settings;
- Click Custom code injection and start typing in the Custom code <\head> tag field or the Custom code <\body> tag field the tag with the classes, with a structure similar to this:
html
<script src="yourscript.js"></script>
- When you are done, make sure you know where the code comes from and how it works to ensure its safety. Once checked, select the Code is safe checkbox and then the Update custom code button to apply the code.