/[meteor]/googlecode.com/svn/trunk/public_html/meteor.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /googlecode.com/svn/trunk/public_html/meteor.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by andrew.betts, Thu Nov 23 15:53:25 2006 UTC revision 59 by andrew.betts, Tue Mar 25 00:38:17 2008 UTC
# Line 1  Line 1 
1  // Set domain at highest level  /*
2  var domainparts = document.domain.split(".");  stream: xhrinteractive, iframe, serversent
3  document.domain = domainparts[domainparts.length-2]+"."+domainparts[domainparts.length-1];  longpoll
4    smartpoll
5  Function.prototype.bind = function(obj) {  simplepoll
6          var method = this,  */
7          temp = function() {  
8                  return method.apply(obj, arguments);  Meteor = {
9          };  
10          return temp;          callbacks: {
11  }                  process: function() {},
12  Function.prototype.andThen=function(g) {                  reset: function() {},
13          var f=this;                  eof: function() {},
14          var a=this.arguments                  statuschanged: function() {},
15          return function(args) {                  changemode: function() {}
16                  f(a);g(args);          },
17          }          channelcount: 0,
18  };          channels: {},
19            debugmode: false,
20  function Meteor(instID) {          frameref: null,
21            host: null,
22          this.lastmsgreceived = -1;          hostid: null,
23          this.transferDoc = false;          maxpollfreq: 60000,
24          this.pingtimer = false;          minpollfreq: 2000,
25          this.updatepollfreqtimer = false;          mode: "stream",
26          this.lastrequest = 0;          pingtimeout: 20000,
27          this.recvtimes = new Array();          pingtimer: null,
28          this.MHostId = false;          pollfreq: 3000,
29          this.callback_process = function() {};          port: 80,
30          this.callback_reset = function() {};          polltimeout: 30000,
31          this.callback_eof = function() {};          recvtimes: [],
32          this.callback_changemode = function() {};          status: 0,
33          this.callback_statuschanged = function() {};          updatepollfreqtimer: null,
34          this.persist = true;  
35          this.frameloadtimer = false;          register: function(ifr) {
36          this.frameurl = false;                  ifr.p = Meteor.process;
37                    ifr.r = Meteor.reset;
38          // Documented public properties                  ifr.eof = Meteor.eof;
39          this.channel = false;                  ifr.ch = Meteor.channelInfo;
40          this.subdomain = "data";                  clearTimeout(Meteor.frameloadtimer);
41          this.dynamicpageaddress = "push";                  Meteor.setstatus(4);
42          this.backtrack = 0;                  Meteor.log("Frame registered");
43          this.smartpoll = true;          },
44          this.pollfreq = 2000;  
45          this.minpollfreq = 2000;          joinChannel: function(channelname, backtrack) {
46          this.mode = "stream";                  if (typeof(Meteor.channels[channelname]) != "undefined") throw "Cannot join channel "+channelname+": already subscribed";
47          this.polltimeout=30000;                  Meteor.channels[channelname] = {backtrack:backtrack};
48          this.maxmessages=0;                  Meteor.log("Joined channel "+channelname);
49          this.pingtimeout = 10000;                  Meteor.channelcount++;
50          this.status = 0;                  if (Meteor.status != 0) Meteor.connect();
51            },
52          /* Statuses:    0 = Uninitialised,  
53                                          1 = Loading stream,          leaveChannel: function(channelname) {
54                                          2 = Loading controller frame,                  if (typeof(Meteor.channels[channelname]) == "undefined") throw "Cannot leave channel "+channelname+": not subscribed";
55                                          3 = Controller frame timeout, retrying every 5 seconds                  delete Meteor.channels[channelname];
56                                          4 = Controller frame loaded and ready                  Meteor.log("Left channel "+channelname);
57                                          5 = Receiving data                  Meteor.channelcount--;
58          */                  if (Meteor.channelcount && Meteor.status != 0) Meteor.connect();
59                    else Meteor.disconnect();
60          // Set or retrieve host id.  Cookie takes this form:          },
61          // MeteorID=123:6356353/124:098320454;  
62          var MeteIds = Meteor.readCookie("MeteorID");          connect: function() {
63          var regex1 = new RegExp("^([0-9\:\/M]+\/)*"+instID+"\:([^\/]+)(\/[0-9\:\/M]+)*$");                  Meteor.log("Connecting");
64          var regex2 = new RegExp("^([0-9\:\/M]+\/)*M\:([^\/]+)(\/[0-9\:\/M]+)*$");                  if (!Meteor.host) throw "Meteor host not specified";
65          if (typeof(instID) == "Number" && regex1.exec(MeteIds)) {                  if (isNaN(Meteor.port)) throw "Meteor port not specified";
66                  this.MHostId = ma[2];                  if (!Meteor.channelcount) throw "No channels specified";
67          } else if (typeof(instID) == "Number") {                  if (Meteor.status) Meteor.disconnect();
68                  this.MHostId = Math.floor(Math.random()*1000000);                  Meteor.setstatus(1);
69                  var newcookie = (MeteIds)?MeteIds+"/":"";                  var now = new Date();
70                  newcookie += instID+":"+this.MHostId;                  var t = now.getTime();
71                  Meteor.createCookie("MeteorID", newcookie);                  if (!Meteor.hostid) Meteor.hostid = t+""+Math.floor(Math.random()*1000000)
72          } else if (ma = regex2.exec(MeteIds)) {                  document.domain = Meteor.extract_xss_domain(document.domain);
73                  this.MHostId = ma[2];                  if (Meteor.mode=="stream") Meteor.mode = Meteor.selectStreamTransport();
74          } else {                  Meteor.log("Selected "+Meteor.mode+" transport");
75                  this.MHostId = Math.floor(Math.random()*1000000);                  if (Meteor.mode=="xhrinteractive" || Meteor.mode=="iframe" || Meteor.mode=="serversent") {
76                  var newcookie = (MeteIds)?MeteIds+"/":"";                          if (Meteor.mode == "iframe") {
77                  newcookie += "M:"+this.MHostId;                                  Meteor.loadFrame(Meteor.getSubsUrl());
78                  Meteor.createCookie("MeteorID", newcookie);                          } else {
79          }                                  Meteor.loadFrame("http://"+Meteor.host+((Meteor.port==80)?"":":"+Meteor.port)+"/stream.html");
80          this.instID = (typeof(instID) != "undefined") ? instID : 0;                          }
81  }                          clearTimeout(Meteor.pingtimer);
82                            Meteor.pingtimer = setTimeout(Meteor.pollmode, Meteor.pingtimeout);
83  Meteor.instances = new Array();  
84  Meteor.servertimeoffset = 0;                  } else {
85                            Meteor.loadFrame("http://"+Meteor.host+((Meteor.port==80)?"":":"+Meteor.port)+"/poll.html");
86  Meteor.create = function(instID) {                          Meteor.recvtimes[0] = t;
87          if (!instID) instID = 0;                          if (Meteor.updatepollfreqtimer) clearTimeout(Meteor.updatepollfreqtimer);
88          Meteor.instances[instID] = new Meteor(instID);                          if (Meteor.mode=='smartpoll') Meteor.updatepollfreqtimer = setInterval(Meteor.updatepollfreq, 2500);
89          return Meteor.instances[instID];                          if (Meteor.mode=='longpoll') Meteor.pollfreq = Meteor.minpollfreq;
90  }                  }
91                    Meteor.lastrequest = t;
92  Meteor.register = function(ifr) {          },
93          instid = new String(ifr.window.frameElement.id);  
94          instid = instid.replace("meteorframe_", "");          disconnect: function() {
95          ifr.p = this.instances[instid].process.bind(this.instances[instid]);                  if (Meteor.status) {
96          ifr.r = this.instances[instid].reset.bind(this.instances[instid]);                          clearTimeout(Meteor.pingtimer);
97          ifr.eof = this.instances[instid].eof.bind(this.instances[instid]);                          clearTimeout(Meteor.updatepollfreqtimer);
98          ifr.get = this.instances[instid].get.bind(this.instances[instid]);                          clearTimeout(Meteor.frameloadtimer);
99          ifr.increasepolldelay = this.instances[instid].increasepolldelay.bind(this.instances[instid]);                          if (typeof CollectGarbage == 'function') CollectGarbage();
100          clearTimeout(this.instances[instid].frameloadtimer);                          if (Meteor.status != 6) Meteor.setstatus(0);
101          this.instances[instid].setstatus(4);                          try {
102  }                                  Meteor.frameref.open();
103                                    Meteor.frameref.close();
104  Meteor.setServerTime = function(timestamp) {                          } catch (e) {
105          var now = new Date();                                  Meteor.frameref.parentNode.removeChild(Meteor.frameref);
106          var clienttime = (now.getTime() / 1000);                          }
107          Meteor.servertimeoffset = timestamp - clienttime;                          delete Meteor.frameref;
108  }                          Meteor.log("Disconnected");
109                    }
110  Meteor.prototype.start = function() {          },
111          this.persist = (this.maxmessages)?1:0;          
112          this.smartpoll = (this.smartpoll)?1:0;          selectStreamTransport: function() {
113          this.mode = (this.mode=="stream")?"stream":"poll";                  try {
114          if (!this.subdomain || !this.channel) throw "Channel or Meteor subdomain host not specified";                          var test = ActiveXObject;
115          var now = new Date();                          return "iframe";
116          var t = now.getTime();                  } catch (e) {}
117          if (typeof(this.transferDoc)=="object") {                  if ((typeof window.addEventStream) == "function") return "iframe";
118                  this.transferDoc.open();                  return "xhrinteractive";
119                  this.transferDoc.close();          },
120                  delete this.transferDoc;  
121          }          getSubsUrl: function() {
122          if (document.getElementById("meteorframe_"+this.instID)) {                  var surl = "http://" + Meteor.host + ((Meteor.port==80)?"":":"+Meteor.port) + "/push/" + Meteor.hostid + "/" + Meteor.mode;
123                  document.body.removeChild(document.getElementById("meteorframe_"+this.instID));                  for (var c in Meteor.channels) {
124          }                          surl += "/"+c;
125          if (this.mode=="stream") {                          if (typeof Meteor.channels[c].lastmsgreceived != 'undefined' && Meteor.channels[c].lastmsgreceived >= 0) {
126                  if (document.all) {                                  surl += ".r"+(Meteor.channels[c].lastmsgreceived+1);
127                          this.setstatus(1);                          } else if (Meteor.channels[c].backtrack > 0) {
128                          this.transferDoc = new ActiveXObject("htmlfile");                                  surl += ".b"+Meteor.channels[c].backtrack;
129                          this.transferDoc.open();                          } else if (Meteor.channels[c].backtrack != undefined) {
130                          this.transferDoc.write("<html>");                                  surl += ".h";
131                          this.transferDoc.write("<script>document.domain=\""+(document.domain)+"\";</"+"script>");                          }
132                          this.transferDoc.write("</html>");                  }
133                          var selfref = this;                  var now = new Date();
134                          this.transferDoc.parentWindow.Meteor = Meteor;                  surl += "?nc="+now.getTime();
135                          this.transferDoc.close();                  return surl;
136                          var ifrDiv = this.transferDoc.createElement("div");          },
137                          this.transferDoc.appendChild(ifrDiv);  
138                          var url = "http://"+this.subdomain+"."+location.hostname+"/"+this.dynamicpageaddress+"?channel="+this.channel+"&id="+this.MHostId;          loadFrame: function(url) {
139                          if (this.lastmsgreceived >= 0) {                  try {
140                                  url += "&restartfrom="+this.lastmsgreceived;                          if (!Meteor.frameref) {
141                          } else if (this.backtrack > 0) {                                  var transferDoc = new ActiveXObject("htmlfile");
142                                  url += "&backtrack="+this.backtrack;                                  Meteor.frameref = transferDoc;
143                          } else if (this.backtrack < 0 || isNaN(this.backtrack)) {                          }
144                                  url += "&restartfrom=";                          Meteor.frameref.open();
145                          }                          Meteor.frameref.write("<html><script>");
146                          ifrDiv.innerHTML = "<iframe id=\"meteorframe_"+this.instID+"\" src=\""+url+"&nocache="+t+"\" style=\"display: none;\"></iframe>";                          Meteor.frameref.write("document.domain=\""+(document.domain)+"\";");
147                  } else {                          Meteor.frameref.write("</"+"script></html>");
148                          var ifr = document.createElement("IFRAME");                          Meteor.frameref.parentWindow.Meteor = Meteor;
149                          ifr.style.width = "10px";                          Meteor.frameref.close();
150                          ifr.style.height = "10px";                          var ifrDiv = Meteor.frameref.createElement("div");
151                          ifr.style.border = "none";                          Meteor.frameref.appendChild(ifrDiv);
152                          ifr.style.position = "absolute";                          ifrDiv.innerHTML = "<iframe src=\""+url+"\"></iframe>";
153                          ifr.style.top = "-10px";                  } catch (e) {
154                          ifr.style.marginTop = "-10px";                          if (!Meteor.frameref) {
155                          ifr.style.zIndex = "-20";                                  var ifr = document.createElement("IFRAME");
156                          ifr.id = "meteorframe_"+this.instID;                                  ifr.style.width = "10px";
157                          document.body.appendChild(ifr);                                  ifr.style.height = "10px";
158                          this.frameurl = "http://"+this.subdomain+"."+location.hostname+"/stream.html";                                  ifr.style.border = "none";
159                          this.frameload();                                  ifr.style.position = "absolute";
160                  }                                  ifr.style.top = "-10px";
161                  var f = this.pollmode.bind(this);                                  ifr.style.marginTop = "-10px";
162                  clearTimeout(this.pingtimer);                                  ifr.style.zIndex = "-20";
163                  this.pingtimer = setTimeout(f, this.pingtimeout);                                  ifr.Meteor = Meteor;
164                                    document.body.appendChild(ifr);
165          } else {                                  Meteor.frameref = ifr;
166                  var ifr = document.createElement("IFRAME");                          }
167                  ifr.style.width = "10px";                          Meteor.frameref.setAttribute("src", url);
168                  ifr.style.height = "10px";                  }
169                  ifr.style.border = "none";                  Meteor.log("Loading URL '"+url+"' into frame...");
170                  if (document.all) {                  Meteor.frameloadtimer = setTimeout(Meteor.frameloadtimeout, 5000);
171                          ifr.style.display = "none";          },
172                  } else {  
173                          ifr.style.position = "absolute";          pollmode: function() {
174                          ifr.style.marginTop = "-10px";                  Meteor.log("Ping timeout");
175                          ifr.style.zIndex = "-20";                  Meteor.mode="smartpoll";
176                  }                  clearTimeout(Meteor.pingtimer);
177                  ifr.id = "meteorframe_"+this.instID;                  Meteor.callbacks["changemode"]("poll");
178                  document.body.appendChild(ifr);                  Meteor.lastpingtime = false;
179                  this.frameurl = "http://"+this.subdomain+"."+location.hostname+"/poll.html";                  Meteor.connect();
180                  this.frameload();          },
181                  this.recvtimes[0] = t;  
182                  if (this.updatepollfreqtimer) clearTimeout(this.updatepollfreqtimer);          process: function(id, channel, data) {
183                  this.updatepollfreqtimer = setInterval(this.updatepollfreq.bind(this), 2500);                  if (id == -1) {
184          }                          Meteor.log("Ping");
185          this.lastrequest = t;                          Meteor.ping();
186  }                  } else if (typeof(Meteor.channels[channel]) != "undefined") {
187                            Meteor.log("Message "+id+" received on channel "+channel+" (last id on channel: "+Meteor.channels[channel].lastmsgreceived+")\n"+data);
188  Meteor.prototype.pollmode = function() {                          Meteor.callbacks["process"](data);
189          this.mode="poll";                          Meteor.channels[channel].lastmsgreceived = id;
190          this.start();                          if (Meteor.mode=="smartpoll") {
191          this.callback_changemode("poll");                                  var now = new Date();
192          this.lastpingtime = false;                                  Meteor.recvtimes[Meteor.recvtimes.length] = now.getTime();
193  }                                  while (Meteor.recvtimes.length > 5) Meteor.recvtimes.shift();
194                            }
195  Meteor.prototype.process = function(id, data) {                  }
196          if (id > this.lastmsgreceived) {                  Meteor.setstatus(5);
197                  this.callback_process(data);          },
198                  if (id != -1) this.lastmsgreceived = id;  
199                  if (this.mode=="poll") {          ping: function() {
200                          var now = new Date();                  if (Meteor.pingtimer) {
201                          var t = now.getTime();                          clearTimeout(Meteor.pingtimer);
202                          this.recvtimes[this.recvtimes.length] = t;                          Meteor.pingtimer = setTimeout(Meteor.pollmode, Meteor.pingtimeout);
203                          while (this.recvtimes.length > 5) this.recvtimes.shift();                          var now = new Date();
204                  }                          Meteor.lastpingtime = now.getTime();
205          } else if (id == -1) {                  }
206                  this.ping();                  Meteor.setstatus(5);
207          }          },
208          this.setstatus(5);  
209  }          reset: function() {
210                    if (Meteor.status != 6) {
211  Meteor.prototype.ping = function() {                          Meteor.log("Stream reset");
212          if (this.mode=="stream" && this.pingtimer) {                          Meteor.ping();
213                  clearTimeout(this.pingtimer);                          Meteor.callbacks["reset"]();
214                  var f = this.pollmode.bind(this);                          var now = new Date();
215                  this.pingtimer = setTimeout(f, this.pingtimeout);                          var t = now.getTime();
216                  var now = new Date();                          var x = Meteor.pollfreq - (t-Meteor.lastrequest);
217                  this.lastpingtime = now.getTime();                          if (x < 10) x = 10;
218          }                          setTimeout(Meteor.connect, x);
219          this.setstatus(5);                  }
220  }          },
221    
222  Meteor.prototype.reset = function() {          eof: function() {
223          var now = new Date();                  Meteor.log("Received end of stream, will not reconnect");
224          var t = now.getTime();                  Meteor.callbacks["eof"]();
225          var x = this.pollfreq - (t-this.lastrequest);                  Meteor.setstatus(6);
226          if (x < 10) x = 10;                  Meteor.disconnect();
227          this.ping();          },
228          this.callback_reset();  
229          setTimeout(this.start.bind(this), x);          channelInfo: function(channel, id) {
230  }                  Meteor.channels[channel].lastmsgreceived = id;
231                    Meteor.log("Received channel info for channel "+channel+": resume from "+id);
232  Meteor.prototype.eof = function() {          },
233          this.callback_eof();  
234  }          updatepollfreq: function() {
235                    var now = new Date();
236  Meteor.prototype.get = function(varname) {                  var t = now.getTime();
237          eval("var a = this."+varname+";");                  var avg = 0;
238          if (typeof(a) == "undefined") throw "Cannot get value of "+varname;                  for (var i=1; i<Meteor.recvtimes.length; i++) {
239          return a;                          avg += (Meteor.recvtimes[i]-Meteor.recvtimes[i-1]);
240  }                  }
241                    avg += (t-Meteor.recvtimes[Meteor.recvtimes.length-1]);
242  Meteor.prototype.increasepolldelay = function() {                  avg /= Meteor.recvtimes.length;
243          this.pollfreq *= 2;                  var target = avg/2;
244  }                  if (target < Meteor.pollfreq && Meteor.pollfreq > Meteor.minpollfreq) Meteor.pollfreq = Math.ceil(Meteor.pollfreq*0.9);
245                    if (target > Meteor.pollfreq && Meteor.pollfreq < Meteor.maxpollfreq) Meteor.pollfreq = Math.floor(Meteor.pollfreq*1.05);
246  Meteor.prototype.updatepollfreq = function() {          },
247          if (this.smartpoll) {  
248                  var now = new Date();          registerEventCallback: function(evt, funcRef) {
249                  var t = now.getTime();                  Function.prototype.andThen=function(g) {
250                  var avg = 0;                          var f=this;
251                  for (var i=1; i<this.recvtimes.length; i++) {                          var a=Meteor.arguments
252                          var x = (this.recvtimes[i]-this.recvtimes[i-1]);                          return function(args) {
253                          avg += (x>60000)? 60000 : x;                                  f(a);g(args);
254                  }                          }
255                  x = (t-this.recvtimes[this.recvtimes.length-1]);                  };
256                  avg += (x>180000)? 180000 : x;                  if (typeof Meteor.callbacks[evt] == "function") {
257                  avg /= this.recvtimes.length;                          Meteor.callbacks[evt] = (Meteor.callbacks[evt]).andThen(funcRef);
258                  if ((avg/3) < this.pollfreq && (avg/3) >= this.minpollfreq) this.pollfreq = Math.ceil(this.pollfreq*0.9);                  } else {
259                  if ((avg/3) > this.pollfreq) this.pollfreq = Math.floor(this.pollfreq*1.05);                          Meteor.callbacks[evt] = funcRef;
260          }                  }
261  }          },
262    
263  Meteor.prototype.registerEventCallback = function(evt, funcRef) {          frameloadtimeout: function() {
264          if (evt=="process") {                  Meteor.log("Frame load timeout");
265                  this.callback_process = (this.callback_process).andThen(funcRef);                  if (Meteor.frameloadtimer) clearTimeout(Meteor.frameloadtimer);
266          } else if (evt=="reset") {                  Meteor.setstatus(3);
267                  this.callback_reset = (this.callback_reset).andThen(funcRef);                  Meteor.pollmode();
268          } else if (evt=="eof") {          },
269                  this.callback_eof = (this.callback_eof).andThen(funcRef);  
270          } else if (evt=="changemode") {          extract_xss_domain: function(old_domain) {
271                  this.callback_changemode = (this.callback_changemode).andThen(funcRef);                  if (old_domain.match(/^(\d{1,3}\.){3}\d{1,3}$/)) return old_domain;
272          } else if (evt=="changestatus") {                  domain_pieces = old_domain.split('.');
273                  this.callback_statuschanged = (this.callback_statuschanged).andThen(funcRef);                  return domain_pieces.slice(-2, domain_pieces.length).join(".");
274          }          },
275  }  
276            setstatus: function(newstatus) {
277  Meteor.prototype.frameload = function() {                  // Statuses:    0 = Uninitialised,
278          this.setstatus(2);                  //                              1 = Loading stream,
279          if (document.getElementById("meteorframe_"+this.instID)) {                  //                              2 = Loading controller frame,
280                  var f = this.frameloadtimeout.bind(this);                  //                              3 = Controller frame timeout, retrying.
281                  this.frameloadtimer = setTimeout(f, 5000);                  //                              4 = Controller frame loaded and ready
282                  document.getElementById("meteorframe_"+this.instID).src = "about:blank";                  //                              5 = Receiving data
283                  setTimeout(this.doloadurl.bind(this), 100);                  //                              6 = End of stream, will not reconnect
284          }  
285  }                  if (Meteor.status != newstatus) {
286  Meteor.prototype.doloadurl = function() {                          Meteor.status = newstatus;
287          var now = new Date();                          Meteor.callbacks["statuschanged"](newstatus);
288          var t = now.getTime();                  }
289          document.getElementById("meteorframe_"+this.instID).src = this.frameurl+"?nocache="+t;          },
290  }  
291  Meteor.prototype.frameloadtimeout = function() {          log: function(logstr) {
292          if (this.frameloadtimer) clearTimeout(this.frameloadtimer);                  if (Meteor.debugmode) {
293          this.setstatus(3);                          if (window.console) {
294          this.frameload();                                  window.console.log(logstr);
295  }                          } else if (document.getElementById("meteorlogoutput")) {
296  Meteor.prototype.setstatus = function(newstatus) {                                  document.getElementById("meteorlogoutput").innerHTML += logstr+"<br/>";
297          if (this.status != newstatus) {                          }
298                  this.status = newstatus;                  }
299                  this.callback_statuschanged(newstatus);          }
300          }  }
301  }  
302    var oldonunload = window.onunload;
303  Meteor.createCookie = function(name,value,days) {  if (typeof window.onunload != 'function') {
304          if (days) {          window.onunload = Meteor.disconnect;
305                  var date = new Date();  } else {
306                  date.setTime(date.getTime()+(days*24*60*60*1000));          window.onunload = function() {
307                  var expires = "; expires="+date.toGMTString();                  if (oldonunload) oldonunload();
308          }                  Meteor.disconnect();
309          else var expires = "";          }
         document.cookie = name+"="+value+expires+"; path=/";  
 }  
   
 Meteor.readCookie = function(name) {  
         var nameEQ = name + "=";  
         var ca = document.cookie.split(';');  
         for(var i=0;i < ca.length;i++) {  
                 var c = ca[i];  
                 while (c.charAt(0)==' ') c = c.substring(1,c.length);  
                 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  
         }  
         return null;  
 }  
   
 Meteor.eraseCookie = function(name) {  
         createCookie(name,"",-1);  
310  }  }

Legend:
Removed from v.7  
changed lines
  Added in v.59

  ViewVC Help
Powered by ViewVC 1.1.26