Advertisement
RPDK

lx

Sep 29th, 2021
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getE(css){return document.querySelector(css)}function Ajax(URL,fun,method){this.ajax=new XMLHttpRequest();this.getText=function(){return this.ajax.responseText};this.qqzht=function(){return this.ajax.readyState};this.fwqzht=function(){return this.ajax.status};this.getAjax=function(){return this.ajax};this.Request=function(URL2,fun2,method2){fun2=fun2||fun;URL2=URL2||URL;method=method||"GET";method2=method2||method;this.ajax.onreadystatechange=function(){if(this.readyState==4&&this.status==200)fun2()};this.ajax.open(method2,URL2);this.ajax.send(null)};this.Request()}function ajax(url,fun){return new Ajax(url,fun)}function setCookie(key,val,expired){d=new Date();d.setTime(d.getTime()+expired*24*60*60*1000);document.cookie=key+"="+val+";expires="+d.toGMTString()}function getCookie(key){var name=key+"=";var c=document.cookie.split(";");for(var i=0;i<c.length;i++){var c2=c[i].trim();if(c2.indexOf(key)==0){return c2.substring(name.length,c2.length)}}return""}function delCookie(key){var d=new Date(0);document.cookie=key+"=0;expires="+d.toGMTString()}var rpdk={Cookie:{create:setCookie,read:getCookie,del:delCookie},Ajax:ajax,getE:getE};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement