Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Sanjeev1236

Squarespace editor stopped working after adding script

Question

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

Share this post


Link to post

1 answer to this question

Recommended Posts

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

 


I am frontend dev that provide solutions to enhance feature of squarespace.com can't provide, please check my profile for more details

--- To Space And Beyond! ---

https://www.freelancer.com/u/BaNgan

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...