server/php/basic/public_html/static/lib/jquery.cookie.js
author rougeronj
Tue, 15 Sep 2015 12:24:58 +0200
changeset 521 0d9b3f1b97e7
parent 442 adb907bba956
permissions -rw-r--r--
Create new view id the current one isn't in the project or if it's the first one (so we let the first one always unchanged) Otherwise modify the current one
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
442
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
/*!
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
 * jQuery Cookie Plugin v1.4.1
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * https://github.com/carhartl/jquery-cookie
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 *
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
 * Copyright 2013 Klaus Hartl
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
 * Released under the MIT license
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
 */
adb907bba956 add server php example
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});