Instantly share code, notes, and snippets.

Embed
What would you like to do?
Legalesign - iframe safari fix (US 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