Files
galaxy/static/scripts/packed/cookie_set.js
T
James Taylor 4b88be5e25 1) Modified index page so progressive loading works better for slower
connections

2) Added a script for packing the javascripts, everything is now repacked
   with yui-compressor (the packed versions are slightly large, but they
   gzip better resulting in an overall reduction).
2007-12-11 19:30:03 +00:00

1 line
543 B
JavaScript

function CookieSet(A){this.cookie_name=A;this.store=store={};q.each((q.cookie(A)||"").split("|"),function(C,B){store[B]=true})}CookieSet.prototype.add=function(A){this.store[A]=true;return this};CookieSet.prototype.remove=function(A){delete this.store[A];return this};CookieSet.prototype.removeAll=function(A){this.store={};return this};CookieSet.prototype.contains=function(A){return(A in this.store)};CookieSet.prototype.save=function(){t=[];for(key in this.store){if(key!=""){t.push(key)}}q.cookie(this.cookie_name,t.join("|"));return this}