| 1 |
function setCookieForNotice(e) { |
| 2 |
var t = new Date, i = t.getTime(); |
| 3 |
"1week" == e && (i += 6048e5), "1month" == e && (i += 2629743e3), "1year" == e && (i += 31556916e3), t.setTime(i), document.cookie = "after_exit" == e ? "cookie_notice_seen=1; path=/" : "cookie_notice_seen=1; expires=" + t.toUTCString() + "; path=/", document.getElementById("patchstack-cookie-notice").style.cssText = "visibility:hidden !important" |
| 4 |
} |
| 5 |
|
| 6 |
(function(window, document, undefined){ |
| 7 |
|
| 8 |
function getCookie(cname) { |
| 9 |
var name = cname + "="; |
| 10 |
var decodedCookie = decodeURIComponent(document.cookie); |
| 11 |
var ca = decodedCookie.split(';'); |
| 12 |
for(var i = 0; i <ca.length; i++) { |
| 13 |
var c = ca[i]; |
| 14 |
while (c.charAt(0) == ' ') { |
| 15 |
c = c.substring(1); |
| 16 |
} |
| 17 |
if (c.indexOf(name) == 0) { |
| 18 |
return c.substring(name.length, c.length); |
| 19 |
} |
| 20 |
} |
| 21 |
return ""; |
| 22 |
} |
| 23 |
|
| 24 |
window.onload = init; |
| 25 |
|
| 26 |
function init(){ |
| 27 |
if(getCookie('cookie_notice_seen') !== '1' && document.getElementById('patchstack-cookie-notice') !== null){ |
| 28 |
document.getElementById('patchstack-cookie-notice').style.visibility = 'visible'; |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
})(window, document, undefined); |