Givnish Posted June 9, 2022 Share Posted June 9, 2022 We are adding a link to an external site. We want to display a message stating that you are leaving our site. I know this isn't supported by Squarespace and I would have to write some code. Can anyone point me in the correct direction? Link to comment
tuanphan Posted June 11, 2022 Share Posted June 11, 2022 Hi. What is your site url? We can check easier 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
sabcarluen Posted March 21 Share Posted March 21 Has this been resolved? I have the same question... Thank you! Link to comment
tuanphan Posted March 25 Share Posted March 25 On 3/21/2023 at 12:43 PM, sabcarluen said: Has this been resolved? I have the same question... Thank you! If you share link to your site, we can help easier 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
andreabalogun_ Posted June 21 Share Posted June 21 I have a question about this too. I have a client that needs disclaimer pop-ups for links that leave the website. URL: https://newmoneynewproblems.squarespace.com/home Password: NMNP Link to comment
creedon Posted June 22 Share Posted June 22 (edited) I don't have a solution but I'm curious why the need to put a disclaimer on every outgoing link? Is this kind of like a disclaimer that we are not responsible for the content on other sites? Could this be handled with a one time disclaimer of some kind? Or even a terms page? I think in 2023 most folks are aware that the content of links to other sites are not the responsibility of the site that you came from to get there. The only issue I could see to linking to other sites is if it involved some kind of legally actionable material. Edited June 22 by creedon paul2009 1 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
andreabalogun_ Posted June 23 Share Posted June 23 18 hours ago, creedon said: I don't have a solution but I'm curious why the need to put a disclaimer on every outgoing link? Is this kind of like a disclaimer that we are not responsible for the content on other sites? Could this be handled with a one time disclaimer of some kind? Or even a terms page? I think in 2023 most folks are aware that the content of links to other sites are not the responsibility of the site that you came from to get there. The only issue I could see to linking to other sites is if it involved some kind of legally actionable material. This is the first time I'm seeing this come up, but my client needs a website that is heavily monitored and needs to fall within some sort of compliance rules as a financial agency. Link to comment
creedon Posted June 23 Share Posted June 23 1 hour ago, andreabalogun_ said: but my client needs a website that is heavily monitored and needs to fall within some sort of compliance rules as a financial agency. Understood. 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
creedon Posted June 23 Share Posted June 23 On 6/21/2023 at 8:24 AM, andreabalogun_ said: I have a client that needs disclaimer pop-ups for links that leave the website. As I say I don't have a solution but how do you see this working? User clicks on an external link. A pop-up occurs with a message. How does the user flow from there? Is it like a two button alert were one button is proceed to the external link and other is cancel? Or, perhaps one button that just says OK? andreabalogun_ and paul2009 2 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
Solution paul2009 Posted June 23 Solution Share Posted June 23 (edited) On 6/21/2023 at 4:24 PM, andreabalogun_ said: I have a client that needs disclaimer pop-ups for links that leave the website. If the site will be on a Business Plan or above, here's something to get you started. Add it to Settings > Developer Tools > Code Injection > Footer. <!--- Inform user before allowing them to leave the site accidentally ----> <script> Array.from(document.querySelectorAll("a")).filter(l => l.hostname !== location.hostname).forEach(el => el.addEventListener("click", clickExt)); function clickExt(e) { if (confirm("You're about to leave our website. Do you want to continue?")) { return; } else { e.preventDefault(); return false; } } </script> This is very basic but it will should get you started by launching a basic browser popup whenever an external link is clicked. This will give visitors the opportunity to change their mind before leaving the site: With some additional HTML/JS, this could be improved by replacing the built-in browser popup with a custom one that includes the features that you need, for example: Did this help? Please give feedback by clicking an icon below ⬇️ Edited June 23 by paul2009 andreabalogun_ and creedon 1 1 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
andreabalogun_ Posted June 27 Share Posted June 27 Thank you SOOOOOOOO MUCH!!!! This worked very well! Thank you. Thank you. paul2009 1 Link to comment
andreabalogun_ Posted June 27 Share Posted June 27 On 6/22/2023 at 8:39 PM, creedon said: As I say I don't have a solution but how do you see this working? User clicks on an external link. A pop-up occurs with a message. How does the user flow from there? Is it like a two button alert were one button is proceed to the external link and other is cancel? Or, perhaps one button that just says OK? A pop-up message. I think the solution below will work very well. Link to comment
hannahstromvig Posted July 28 Share Posted July 28 When I click a button link on a site I'm building, it needs to pop up a message that displays ' you are now leaving this site and going to xyz'. Does anyone know how to do this or have a code to put in? Link to comment
paul2009 Posted July 28 Share Posted July 28 1 hour ago, hannahstromvig said: When I click a button link on a site I'm building, it needs to pop up a message that displays ' you are now leaving this site and going to xyz'. Please see the answer I provided above. Did this help? Please give feedback by clicking an icon below ⬇️ 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
hannahstromvig Posted August 4 Share Posted August 4 Is there a way to attach this to specific links? Some of the external links can be excluded from compliance. Link to comment
paul2009 Posted August 4 Share Posted August 4 3 minutes ago, hannahstromvig said: Is there a way to attach this to specific links? Yes sure. You'll need to decide how you want to identify those (either the ones to be included or excluded) and then modify the selector to match/exclude them 🙂 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment