/[meteor]/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 /trunk/public_html/meteor.js

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

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

Legend:
Removed from v.19  
changed lines
  Added in v.61

  ViewVC Help
Powered by ViewVC 1.1.26