Skip to content

Instantly share code, notes, and snippets.

Created March 10, 2017 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/73e8252114d1c29aa3ff55aa8284063f to your computer and use it in GitHub Desktop.
Save anonymous/73e8252114d1c29aa3ff55aa8284063f to your computer and use it in GitHub Desktop.
Legalesign - Safari iframe fix (EU servers)
//thanks to https://github.com/vitr/safari-cookie-in-iframe
//important:
//1. send us the url for your iframe page - if page is dynamic send us the root url and use 'path' query below.
//if your page URL is static, ignore the 'path' query.
//2. execute this before iframe loads
<script src="//cdn.jsdelivr.net/g/jquery@1.11.0"></script>
<script src="//cdn.jsdelivr.net/jquery.cookie/1.4.0/jquery.cookie.min.js"></script>
<script type="text/javascript">
if (!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)) {
if (!$.cookie('fixed')) {
$.cookie('fixed', 'fixed');
window.location.replace("https://app1.legalesign.com/auth/_safari_fix/?user=[your-user-id]&group=[group-name]&path=[quoted-url-of-this-path-if-dynamic");
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment