+
The source code
@@ -59,13 +60,15 @@ Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, {
// private
readCookies : function(){
- var cookies = {};
- var c = document.cookie + ";";
- var re = /\s?(.*?)=(.*?);/g;
- var matches;
+ var cookies = {},
+ c = document.cookie + ";",
+ re = /\s?(.*?)=(.*?);/g,
+ matches,
+ name, value;
+
while((matches = re.exec(c)) != null){
- var name = matches[1];
- var value = matches[2];
+ name = matches[1];
+ value = matches[2];
if(name && name.substring(0,3) == "ys-"){
cookies[name.substr(3)] = this.decodeValue(value);
}