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
  • Solution

Is is possible you turned on Preview in Safe Mode?

See Disable scripts in preview (If the disable scripts message doesn't appear automatically, step 1).

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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/

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment
  • 1 year later...

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.