mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
1 line
544 B
JavaScript
1 line
544 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}; |