Jump to content

7.1 Disable Script in Edit Mode

Go to solution Solved by creedon,

Recommended Posts

Hello everyone,

I hope you are all doing well,

I'm encountering a peculiar issue with the Editor. I've inserted a code block with a few lines of jQuery that dynamically hide a couple of sections on my homepage. I've deliberately put this script in a code block and not as code injection, so that the Editor would disable it while I'm working on the site.

But Squarespace inconveniently loads the script when I'm in the Editor instead of showing me the Safe Mode notification -_-

Do you know how to prevent this from happening?

 

Cheers,

Marina

 

 

Link to comment
  • 2 weeks later...
  • 1 year later...

I also had an issue where my entire site crashed and couldn't even disable scripts in the editor, no matter what I tried.

My fix was to, very quickly, run this from dev tools console after the square space editor loaded to remove the site preview iframe:

$('#sqs-site-frame').remove()

Hope this helps someone!

Link to comment
3 hours ago, bauerjon said:

I also had an issue where my entire site crashed and couldn't even disable scripts in the editor, no matter what I tried.

You can put your site into a "safe mode" that prevents custom code from loading by adding "/safe" to the URL like this: https://your-site.squarespace.com/config/safe/

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
Catch up on all the release notes and announcements 2023 [for Circle members only] (there's a public version here)

Buy me a coffee

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.