/[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 38 by andrew.betts, Thu Dec 20 21:24:24 2007 UTC revision 39 by andrew.betts, Sat Feb 2 16:49:20 2008 UTC
# Line 25  Meteor = { Line 25  Meteor = {
25          mode: "stream",          mode: "stream",
26          pingtimeout: 20000,          pingtimeout: 20000,
27          pingtimer: null,          pingtimer: null,
28          pollfreq: 5000,          pollfreq: 3000,
29          port: 80,          port: 80,
30          polltimeout: 30000,          polltimeout: 30000,
31          recvtimes: [],          recvtimes: [],
# Line 91  Meteor = { Line 91  Meteor = {
91    
92          disconnect: function() {          disconnect: function() {
93                  if (Meteor.status) {                  if (Meteor.status) {
                         if (typeof(Meteor.frameref)=="iframe") Meteor.frameref.setAttribute("src", "about:blank");  
                         Meteor.frameref = null;  
94                          clearTimeout(Meteor.pingtimer);                          clearTimeout(Meteor.pingtimer);
95                          clearTimeout(Meteor.updatepollfreqtimer);                          clearTimeout(Meteor.updatepollfreqtimer);
96                          clearTimeout(Meteor.frameloadtimer);                          clearTimeout(Meteor.frameloadtimer);
# Line 126  Meteor = { Line 124  Meteor = {
124          },          },
125    
126          loadFrame: function(url) {          loadFrame: function(url) {
                 Meteor.frameref = null;  
127                  try {                  try {
128                          var transferDoc = new ActiveXObject("htmlfile");                          if (!Meteor.frameref) {
129                          transferDoc.open();                                  var transferDoc = new ActiveXObject("htmlfile");
130                          transferDoc.write("<html><script>");                                  Meteor.frameref = transferDoc;
131                          transferDoc.write("document.domain=\""+(document.domain)+"\";");                          }
132                          transferDoc.write("</"+"script></html>");                          Meteor.frameref.open();
133                          transferDoc.parentWindow.Meteor = Meteor;                          Meteor.frameref.write("<html><script>");
134                          transferDoc.close();                          Meteor.frameref.write("document.domain=\""+(document.domain)+"\";");
135                          var ifrDiv = transferDoc.createElement("div");                          Meteor.frameref.write("</"+"script></html>");
136                          transferDoc.appendChild(ifrDiv);                          Meteor.frameref.parentWindow.Meteor = Meteor;
137                            Meteor.frameref.close();
138                            var ifrDiv = Meteor.frameref.createElement("div");
139                            Meteor.frameref.appendChild(ifrDiv);
140                          ifrDiv.innerHTML = "<iframe src=\""+url+"\"></iframe>";                          ifrDiv.innerHTML = "<iframe src=\""+url+"\"></iframe>";
                         Meteor.frameref = transferDoc;  
141                  } catch (e) {                  } catch (e) {
142                          var ifr = document.createElement("IFRAME");                          if (!Meteor.frameref) {
143                          ifr.style.width = "10px";                                  var ifr = document.createElement("IFRAME");
144                          ifr.style.height = "10px";                                  ifr.style.width = "10px";
145                          ifr.style.border = "none";                                  ifr.style.height = "10px";
146                          ifr.style.position = "absolute";                                  ifr.style.border = "none";
147                          ifr.style.top = "-10px";                                  ifr.style.position = "absolute";
148                          ifr.style.marginTop = "-10px";                                  ifr.style.top = "-10px";
149                          ifr.style.zIndex = "-20";                                  ifr.style.marginTop = "-10px";
150                          ifr.Meteor = Meteor;                                  ifr.style.zIndex = "-20";
151                          ifr.setAttribute("src", url);                                  ifr.Meteor = Meteor;
152                          document.body.appendChild(ifr);                                  document.body.appendChild(ifr);
153                          Meteor.frameref = ifr;                                  Meteor.frameref = ifr;
154                            }
155                            Meteor.frameref.setAttribute("src", url);
156                  }                  }
157                  Meteor.log("Loading URL '"+url+"' into frame...");                  Meteor.log("Loading URL '"+url+"' into frame...");
158                  Meteor.frameloadtimer = setTimeout(Meteor.frameloadtimeout, 5000);                  Meteor.frameloadtimer = setTimeout(Meteor.frameloadtimeout, 5000);
# Line 159  Meteor = { Line 160  Meteor = {
160    
161          pollmode: function() {          pollmode: function() {
162                  Meteor.log("Ping timeout");                  Meteor.log("Ping timeout");
163                  Meteor.mode="smartpoll";                  Meteor.mode="simplepoll";
164                  clearTimeout(Meteor.pingtimer);                  clearTimeout(Meteor.pingtimer);
165                  Meteor.connect();                  Meteor.connect();
166                  Meteor.callbacks["changemode"]("poll");                  Meteor.callbacks["changemode"]("poll");

Legend:
Removed from v.38  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.26