I am managing a SharePoint website in SharePoint online, and I created a custom app using the Modern Script Editor webpart (this one). What I'd like to do is make my site read only, preventing anyone but owners from editing it (and by that I mean adding pages, etc.). However, if I make it read only, the script tag in my HTML code inside the web part I added to the page won't run, giving me the following errors:
Is there any way I can make my website read only for members while still being able to execute the script?
Thanks in advance.