Created
March 10, 2017 13:34
-
-
Save anonymous/73e8252114d1c29aa3ff55aa8284063f to your computer and use it in GitHub Desktop.
Legalesign - Safari iframe fix (EU servers)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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