Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     var is_safari = navigator.userAgent.indexOf("Safari") > -1;
  3.     // Chrome has Safari in the user agent so we need to filter (https://stackoverflow.com/a/7768006/1502448)
  4.     var is_chrome = navigator.userAgent.indexOf('Chrome') > -1;
  5.     if ((is_chrome) && (is_safari)) {is_safari = false;}  
  6.     if (is_safari) {
  7.         // See if cookie exists (https://stackoverflow.com/a/25617724/1502448)
  8.         if (!document.cookie.match(/^(.*;)?\s*fixed\s*=\s*[^;]+(.*)?$/)) {
  9.             // Set cookie to maximum (https://stackoverflow.com/a/33106316/1502448)
  10.             document.cookie = 'fixed=fixed; expires=Tue, 19 Jan 2038 03:14:07 UTC; path=/';
  11.             window.location.replace("https://www.davincivirtual.com/_safari_fix.html");
  12.         }
  13.     }
  14. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement