Answer the question
In order to leave comments, you need to log in
How to save instead of cookies in localstorage?
Hello.
Please help me with the script:
Startloadreadofcom = function() {
function setCookie(a,b,c){if(c){var d=new Date();d.setTime(d.getTime()+(c*24*60*60*1000));var e="; expires="+d.toGMTString()}else var e="";document.cookie=a+"="+b+e+"; path=/"};function getCookie(a){var b=a+"=";var d=document.cookie.split(';');for(var i=0;i<d.length;i++){var c=d[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(b)==0)return c.substring(b.length,c.length)}return null};function delCookie(a){setCookie(a,"",-1)};
(function(){
if(navigator.cookieEnabled){
var dt=new Date().getDate(),nm='_hbip_'+dt,hbip=getCookie(nm),e1=$('.loadreadofcom'),e2=$('.disableofcom');
if(!e1.size()||!e2.size())return;
if(hbip){
var cn=parseInt(hbip)+1;
if(cn>5){
$('.loadreadofcom img').each(function(){
if(this.src.indexOf('.')!=-1){
this.src=this.src.replace('.','.feikcom2');
};
});
e1.attr('class','disableofcom');
e2.attr('class','loadreadofcom');
}else{
setCookie(nm,cn,1);
};
}else{
setCookie(nm,1,1);
};
}else{
alert('Включите поддержку Cookie');
e1.remove();
e2.remove();
};
})();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question