Skip to content

Commit a0c4a94

Browse files
authored
Improve email javascript in sidebar (cotes2020#155)
This will appear in Firefox and Safari. Remediates the issue describe here: https://stackoverflow.com/questions/21461589/javascript-mailto-using-window-open#32675594
1 parent fa8cb8b commit a0c4a94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_includes/sidebar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
https://twitter.com/{{ site.twitter.username }}
7373
{%- elsif entry.type == 'email' -%}
7474
{% assign email = site.social.email | split: '@' %}
75-
javascript:window.open('mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@'))
75+
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
7676
{%- elsif entry.type == 'rss' -%}
7777
{{ "/feed.xml" | relative_url }}
7878
{%- else -%}
@@ -87,4 +87,4 @@
8787
{% endif %}
8888
{% endfor %}
8989

90-
</div>
90+
</div>

0 commit comments

Comments
 (0)