diff options
author | Nathaniel <catch@35733.no-reply.drupal.org> | 2011-11-01 12:25:12 +0900 |
---|---|---|
committer | Nathaniel <catch@35733.no-reply.drupal.org> | 2011-11-01 12:25:12 +0900 |
commit | f0a16bf2a4d1524aa33b656533e37d977cca4802 (patch) | |
tree | 26bd67dad05b2c304c5650d9ac6b31a611102f6b /core/misc/jquery.cookie.js | |
parent | 3629b1fd8bd14cae233ac89b6349d251fe4fb27e (diff) | |
download | drupal-f0a16bf2a4d1524aa33b656533e37d977cca4802.tar.gz drupal-f0a16bf2a4d1524aa33b656533e37d977cca4802.zip |
Issue #22336 by quicksketch, rfay, scor, Rob Loach, boombatower, tstoeckler, kbahey: Move all core Drupal files under a /core folder to improve usability and upgrades.
Diffstat (limited to 'core/misc/jquery.cookie.js')
-rw-r--r-- | core/misc/jquery.cookie.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/misc/jquery.cookie.js b/core/misc/jquery.cookie.js new file mode 100644 index 000000000000..79f514c2059e --- /dev/null +++ b/core/misc/jquery.cookie.js @@ -0,0 +1,11 @@ + +/** + * Cookie plugin 1.0 + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ +jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}}; |