Hello!
I've no experience with javascript and i'd like to modify a script, i need to change the cookie duration to 30 days. The cookie portion of the script is the following:
By the way could anyone please tell me what is the current cookie duration on the code above?
Thanks!!
I've no experience with javascript and i'd like to modify a script, i need to change the cookie duration to 30 days. The cookie portion of the script is the following:
Code:
} function unblockContent(){ document.getElementsByTagName('body')[0].style.overflow = blocker_originalBodyOverflow; document.getElementsByTagName('html')[0].style.overflow = blocker_originalHtmlOverflow; document.getElementById('blocker_haze').style.display = 'none'; document.getElementById('blocker_centerPane').style.display = 'none'; blocker_setCookie("content_unlocked", 1, 2000); } function blocker_setCookie(c_name,value,expiredays){ var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); } function blocker_getCookie(c_name){ if (document.cookie.length>0){ c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1){ c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; }
Thanks!!
Comment