lib/har/viewer/scripts/core/cookies.js in har-0.1.0 vs lib/har/viewer/scripts/core/cookies.js in har-0.1.1
- old
+ new
@@ -1,2 +1,4 @@
-require.def("core/cookies",["core/lib"],function(a){var b={getCookie:function(b){var c=document.cookie.split(";");for(var d=0;d<c.length;d++){var e=c[d].split("=");if(a.trim(e[0])==b)return e[1].length?unescape(a.trim(e[1])):null}},setCookie:function(a,b,c,d,e,f){var g=new Date;g.setTime(g.getTime()),c&&(c=c*1e3*60*60*24);var h=new Date(g.getTime()+c);document.cookie=a+"="+escape(b)+(c?";expires="+h.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(f?";secure":"")},removeCookie:function(a,b,c){this.getCookie(a)&&(document.cookie=a+"="+(b?";path="+b:"")+(c?";domain="+c:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT")},toggleCookie:function(a){var b=this.getBooleanCookie(a);this.setCookie(a,!b)},getBooleanCookie:function(a){var b=this.getCookie(a);return!b||b=="false"?!1:!0},setBooleanCookie:function(a,b){this.setCookie(a,b?"true":"false")}};return b})
+/* See license.txt for terms of usage */
+
+define(["core/lib"],function(e){var t={getCookie:function(t){var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r].split("=");if(e.trim(i[0])==t)return i[1].length?unescape(e.trim(i[1])):null}},setCookie:function(e,t,n,r,i,s){var o=new Date;o.setTime(o.getTime()),n&&(n=n*1e3*60*60*24);var u=new Date(o.getTime()+n);document.cookie=e+"="+escape(t)+(n?";expires="+u.toGMTString():"")+(r?";path="+r:"")+(i?";domain="+i:"")+(s?";secure":"")},removeCookie:function(e,t,n){this.getCookie(e)&&(document.cookie=e+"="+(t?";path="+t:"")+(n?";domain="+n:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT")},toggleCookie:function(e){var t=this.getBooleanCookie(e);this.setCookie(e,!t)},getBooleanCookie:function(e){var t=this.getCookie(e);return!t||t=="false"?!1:!0},setBooleanCookie:function(e,t){this.setCookie(e,t?"true":"false")}};return t});
\ No newline at end of file