Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getCookie(name) {
- var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));
- return matches ? decodeURIComponent(unescape(matches[1])) : undefined;
- }
- function setCookie(name, value, expires) {
- document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement