Jump to content

Opening GoogleCalendar events in new tab

Recommended Posts

  • Replies 14
  • Created
  • Last Reply

Top Posters In This Topic

On 3/17/2022 at 11:57 PM, MissMackay said:

Site URL: https://uvehub.com/training-and-consulting/courses/foundations-03-2022

Want a new tab to open when user clicks on the Google Calendar or ICS links for an event. Is this possible?

Add to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('li.eventitem-meta-item.eventitem-meta-export.event-meta-item a').attr('target','_blank');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 4 months later...
On 8/6/2022 at 2:03 PM, Nikitaly said:

That's great.  How do you do the same for ical?

thanks

 

Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('ul.eventitem-meta.event-meta.event-meta-addtocalendar-container a').attr('target','_blank');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 3 weeks later...
5 hours ago, Nikitaly said:

Hello again,

The scripts above have stopped working.  Have tried to pin them down without success so far.  Can anyone help?

thanks

What is your site url?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
22 hours ago, Nikitaly said:

Sorry:

https://rebelrebel.squarespace.com/testpage?p

thanks for taking a look.

 

Thank you. I don't see google calendar on event page 

https://rebelrebel.squarespace.com/events

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 3/19/2022 at 8:47 AM, tuanphan said:

Add to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('li.eventitem-meta-item.eventitem-meta-export.event-meta-item a').attr('target','_blank');
});
</script>

 

Hi, there's no calendar, just the links to add to google calendar or ics link

thanks again for looking

Link to comment
On 8/31/2022 at 4:54 PM, Nikitaly said:

Hi, there's no calendar, just the links to add to google calendar or ics link

thanks again for looking

Can you share link to page where I can find gg/ic link?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 2 weeks later...
On 9/15/2022 at 4:18 PM, Nikitaly said:

Sorry again.  Been away awhile.  Scheduling isn't active now on the test site but here's a sample page:

https://walrus-springtail-ljhd.squarespace.com/workshop-events/novemberworkshop?p

pw: 1mageproblem.

 

 

Add this to Last Line in Code Injection > Footer

<script>
$(document).ready(function() {
	$('ul.event-meta-addtocalendar-container a').attr('target','_blank');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.