Jump to content

Squarespace editor stopped working after adding script

Recommended Posts

Site URL: https://cello-octahedron-fc3t.squarespace.com

Hi, I have embedded an RSS feed to my squarespace site and after saving the page, that page is no more editable. Clicking on edit(Pencil) icon doesn't work. It ends up only by deleting the page. I'm using following script for that

<script src="https://rss.bloople.net/?url=https%3A%2F%2Fwww.comicsrss.com%2Frss%2Fjumpstart.rss&limit=1&showtitle=false&type=js"></script>

Although it's working fine when actually preview the site but squarespace editor is not working, is there any way that we can stop running the scripts in editor mode or something like that?

Thanks in Advance

Link to comment
On 7/22/2020 at 5:42 PM, Sanjeev1236 said:

Site URL: https://cello-octahedron-fc3t.squarespace.com

Hi, I have embedded an RSS feed to my squarespace site and after saving the page, that page is no more editable. Clicking on edit(Pencil) icon doesn't work. It ends up only by deleting the page. I'm using following script for that

<script src="https://rss.bloople.net/?url=https%3A%2F%2Fwww.comicsrss.com%2Frss%2Fjumpstart.rss&limit=1&showtitle=false&type=js"></script>

Although it's working fine when actually preview the site but squarespace editor is not working, is there any way that we can stop running the scripts in editor mode or something like that?

Thanks in Advance

Hi there,

You can use this script to detect if the page is in editor or not, then append the rss script accordingly

<script>
	document.addEventListener('DOMContentLoaded', function() {
      if ( window.location == window.parent.location ) {
          var script = document.createElement('script');
          script.type = 'text/javascript';
          script.src = 'https://rss.bloople.net/?url=https%3A%2F%2Fwww.comicsrss.com%2Frss%2Fjumpstart.rss&limit=1&showtitle=false&type=js';    

          document.getElementsByTagName('head')[0].appendChild(script);
      } else {
          console.log('iframe');
      }
  });
</script>

 

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

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.