From 46a8efb38afcb75b2092ba685d00cd889a6a264b Mon Sep 17 00:00:00 2001 From: Marnick Vandecauter Date: Sun, 18 Oct 2020 16:10:27 +0000 Subject: [PATCH] Improve email javascript in sidebar (#155) This will appear in Firefox and Safari. Remediates the issue describe here: https://stackoverflow.com/questions/21461589/javascript-mailto-using-window-open#32675594 --- _includes/sidebar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/sidebar.html b/_includes/sidebar.html index fb7421a..31cf920 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -72,7 +72,7 @@ https://twitter.com/{{ site.twitter.username }} {%- elsif entry.type == 'email' -%} {% assign email = site.social.email | split: '@' %} - javascript:window.open('mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')) + javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@') {%- elsif entry.type == 'rss' -%} {{ "/feed.xml" | relative_url }} {%- else -%} @@ -87,4 +87,4 @@ {% endif %} {% endfor %} - \ No newline at end of file +