Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing 3.2 files

  • Loading branch information...
commit 267130b74423fe99cc92eca7828b04791d2f6e34 1 parent f8aa33f
geremy cohen authored
View
6 javascript/3.2/pubnub-3.2.js
@@ -561,7 +561,7 @@ function xdr( setup ) {
* });
*/
function ajax( setup ) {
- var xhr
+ var xhr, response
, finished = function() {
if (loaded) return;
loaded = 1;
@@ -813,7 +813,7 @@ var PDIV = $('pubnub') || {}
disconnected = 1;
disconnect();
}
- timeout( pubnub, SECOND );
+ timeout( _connect, SECOND );
SELF['time'](function(success){
// Reconnect
if (success && disconnected) {
@@ -853,7 +853,7 @@ var PDIV = $('pubnub') || {}
callback( msg, messages );
} );
- timeout( pubnub, 10 );
+ timeout( _connect, 10 );
}
});
}
View
38 javascript/3.2/pubnub-3.2.min.js
@@ -1,20 +1,18 @@
-(function(){
-window.JSON&&window.JSON.stringify||function(){function r(c){u.lastIndex=0;return u.test(c)?'"'+c.replace(u,function(c){var d=D[c];return"string"===typeof d?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function n(m,p){var d,j,i,o,t=c,k,f=p[m];f&&("object"===typeof f&&"function"===typeof f.toJSON)&&(f=f.toJSON(m));"function"===typeof h&&(f=h.call(p,m,f));switch(typeof f){case "string":return r(f);case "number":return isFinite(f)?String(f):"null";case "boolean":case "null":return String(f);
-case "object":if(!f)return"null";c+=g;k=[];if("[object Array]"===Object.prototype.toString.apply(f)){o=f.length;for(d=0;d<o;d+=1)k[d]=n(d,f)||"null";i=0===k.length?"[]":c?"[\n"+c+k.join(",\n"+c)+"\n"+t+"]":"["+k.join(",")+"]";c=t;return i}if(h&&"object"===typeof h){o=h.length;for(d=0;d<o;d+=1)j=h[d],"string"===typeof j&&(i=n(j,f))&&k.push(r(j)+(c?": ":":")+i)}else for(j in f)Object.hasOwnProperty.call(f,j)&&(i=n(j,f))&&k.push(r(j)+(c?": ":":")+i);i=0===k.length?"{}":c?"{\n"+c+k.join(",\n"+c)+"\n"+
-t+"}":"{"+k.join(",")+"}";c=t;return i}}window.JSON||(window.JSON={});"function"!==typeof String.prototype.toJSON&&(String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var u=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c,g,D={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;"function"!==typeof JSON.stringify&&(JSON.stringify=function(m,
-p,d){var j;g=c="";if(typeof d==="number")for(j=0;j<d;j=j+1)g=g+" ";else typeof d==="string"&&(g=d);if((h=p)&&typeof p!=="function"&&(typeof p!=="object"||typeof p.length!=="number"))throw Error("JSON.stringify");return n("",{"":m})});"function"!==typeof JSON.parse&&(JSON.parse=function(c){return eval("("+c+")")})}();
-window.PUBNUB||function(){function r(){return"x"+ ++S+""+ +new Date}function n(){return+new Date}function u(a,b){var e,c=0,f=function(){c+b>n()?(clearTimeout(e),e=setTimeout(f,b)):(c=n(),a())};return f}function c(a){return document.getElementById(a)}function g(a){console.log(a)}function D(a,b){var e=[];h(a.split(/\s+/),function(a){h((b||document).getElementsByTagName(a),function(a){e.push(a)})});return e}function h(a,b){if(a&&b)if("undefined"!=typeof a[0])for(var e=0,c=a.length;e<c;)b.call(a[e],a[e],
-e++);else for(e in a)a.hasOwnProperty&&a.hasOwnProperty(e)&&b.call(a[e],e,a[e])}function m(a,b){var e=[];h(a||[],function(a,c){e.push(b(a,c))});return e}function p(a,b){return a.replace(T,function(a,c){return b[c]||a})}function d(a,b,e){h(a.split(","),function(a){var c=function(a){a||(a=window.event);e(a)||(a.cancelBubble=!0,a.returnValue=!1,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())};b.addEventListener?b.addEventListener(a,c,!1):b.attachEvent?b.attachEvent("on"+
-a,c):b["on"+a]=c})}function j(){return D("head")[0]}function i(a,b,c){if(c)a.setAttribute(b,c);else return a&&a.getAttribute&&a.getAttribute(b)}function o(a,b){for(var c in b)if(b.hasOwnProperty(c))try{a.style[c]=b[c]+(0<"|width|height|top|left|".indexOf(c)&&"number"==typeof b[c]?"px":"")}catch(f){}}function t(a){return document.createElement(a)}function k(){return F||l()?0:r()}function f(a){return m(encodeURIComponent(a).split(""),function(a){return 0>"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}
-function v(a){if(F||l()){a:{var b,e=function(){if(!d){d=1;clearTimeout(g);try{response=JSON.parse(b.responseText)}catch(a){return y(1)}h(response)}},f=0,d=0,g=setTimeout(function(){y(1)},G),k=a.fail||function(){},h=a.success||function(){},y=function(a){f||(f=1,clearTimeout(g),b&&(b.onerror=b.onload=null,b.abort&&b.abort(),b=null),a&&k())};try{b=l()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){y(1)};b.onload=b.onloadend=e;b.timeout=G;url=a.url.join(L);
-if(a.data)for(key in url+="?",a.data)url+=key+"="+a.data[key]+"&";b.open("GET",url,!0);b.send()}catch(V){y(0);F=0;a=v(a);break a}a=y}return a}var q=t("script"),e=a.callback,M=r(),N=0,U=setTimeout(function(){m(1)},G),p=a.fail||function(){},n=a.success||function(){},m=function(a,b){N||(N=1,a||n(b),q.onerror=null,clearTimeout(U),setTimeout(function(){a&&p();var b=c(M),q=b&&b.parentNode;q&&q.removeChild(b)},B))};window[e]=function(a){m(0,a)};q[O]=O;q.onerror=function(){m(1)};q.src=a.url.join(L);if(a.data)for(key in q.src+=
-"?",a.data)q.src+=key+"="+a.data[key]+"&";i(q,"id",M);j().appendChild(q);return m}function H(){PUBNUB.time(n);PUBNUB.time(function(){setTimeout(function(){I||(I=1,h(P,function(a){a[2].subscribe(a[0],a[1])}))},B)})}function l(){if(!Q.get)return 0;var a={id:l.id++,send:function(){},abort:function(){a.id={}},open:function(b,c){l[a.id]=a;Q.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||function(){});var w,E=window.localStorage;
-w={get:function(a){try{return E?E.getItem(a):-1==document.cookie.indexOf(a)?null:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null}catch(b){}},set:function(a,b){try{if(E)return E.setItem(a,b)&&0;document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(c){}}};var S=1,T=/{([\w\-]+)}/g,O="async",L="/",G=31E4,B=1E3,F=-1==navigator.userAgent.indexOf("MSIE 6"),J,K=Math.floor(9*Math.random())+1;J=function(a){return 0<a.indexOf("pubsub")&&a.replace("pubsub","ps"+(10>++K?
-K:K=1))||a};var C={list:{},unbind:function(a){C.list[a]=[]},bind:function(a,b){(C.list[a]=C.list[a]||[]).push(b)},fire:function(a,b){h(C.list[a]||[],function(a){a(b)})}},s=c("pubnub")||{},I=0,P=[],R=function(a){var b={},e=a.publish_key||"",l=a.subscribe_key||"",s=a.ssl?"s":"",x=a.uuid||w.get(l+"uuid")||"",A="http"+s+"://"+(a.origin||"pubsub.pubnub.com"),z={history:function(a,b){var b=a.callback||b,c=a.limit||100,e=a.channel,d=k();if(!e)return g("Missing Channel");if(!b)return g("Missing Callback");
-v({callback:d,url:[A,"history",l,f(e),d,c],success:function(a){b(a)},fail:function(a){g(a)}})},time:function(a){var b=k();v({callback:b,url:[A,"time",b],success:function(b){a(b[0])},fail:function(){a(0)}})},uuid:function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)});a&&a(b);return b},publish:function(a,b){var b=b||a.callback||function(){},c=a.message,d=a.channel,h=k();if(!c)return g("Missing Message");if(!d)return g("Missing Channel");
-if(!e)return g("Missing Publish Key");c=JSON.stringify(c);c=[A,"publish",e,l,0,f(d),h,f(c)];v({callback:h,success:function(a){b(a)},fail:function(){b([0,"Disconnected"])},url:c,data:{uuid:x}})},unsubscribe:function(a){function c(a){a in b&&(b[a].connected=0,b[a].done&&b[a].done(0))}c(a.channel);c(a.channel+"-pnpres")},subscribe:function(a,c){var d=a.channel,c=c||a.callback,e=a.subscribe_key||l,i=a.restore,j=0,m=a.error||function(){},p=a.connect||function(){},n=a.reconnect||function(){},s=a.disconnect||
-function(){},r=a.presence||function(){},o=0,t=0,u=J(A);if(!I)return P.push([a,c,z]);if(!d)return g("Missing Channel");if(!c)return g("Missing Callback");if(!l)return g("Missing Subscribe Key");d in b||(b[d]={});if(b[d].connected)return g("Already Connected");b[d].connected=1;a.presence&&z.subscribe({channel:a.channel+"-pnpres",callback:r,restore:a.restore});r=k();b[d].connected&&(b[d].done=v({callback:r,url:[u,"subscribe",e,f(d),r,j],data:{uuid:x},fail:function(){o||(o=1,s());setTimeout(pubnub,B);
-z.time(function(a){if(a&&o){o=0;n()}else m()})},success:function(a){b[d].connected&&(t||(t=1,p()),o&&(o=0,n()),i=w.set(l+d,j=i&&w.get(e+d)||a[1]),h(a[0],function(b){c(b,a)}),setTimeout(pubnub,10))}}))},here_now:function(a,b){var b=a.callback||b,c=a.channel,d=k(),e=J(A);if(!c)return g("Missing Channel");if(!b)return g("Missing Callback");data=null;"0"!=d&&(data.callback=d);v({callback:d,url:[e,"v2","presence","sub_key",l,"channel",f(c)],data:data,success:function(a){b(a)},fail:function(a){g(a)}})},
-xdr:v,ready:H,db:w,each:h,map:m,css:o,$:c,create:t,bind:d,supplant:p,head:j,search:D,attr:i,now:n,unique:r,events:C,updater:u,init:R};""==x&&(x=z.uuid());w.set(l+"uuid",x);return z};PUBNUB=R({publish_key:i(s,"pub-key"),subscribe_key:i(s,"sub-key"),ssl:"on"==i(s,"ssl"),origin:i(s,"origin"),uuid:i(s,"uuid")});o(s,{position:"absolute",top:-B});if("opera"in window||i(s,"flash"))s.innerHTML="<object id=pubnubs data=https://dh15atwfs066y.cloudfront.net/pubnub.swf><param name=movie value=https://dh15atwfs066y.cloudfront.net/pubnub.swf><param name=allowscriptaccess value=always></object>";
-var Q=c("pubnubs")||{};d("load",window,function(){setTimeout(H,0)});PUBNUB.rdx=function(a,b){if(!b)return l[a].onerror();l[a].responseText=unescape(b);l[a].onload()};l.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&H()}();
-})();
+window.JSON&&window.JSON.stringify||function(){function t(c){v.lastIndex=0;return v.test(c)?'"'+c.replace(v,function(c){var f=D[c];return"string"===typeof f?f:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function q(r,p){var f,k,j,n,s=c,l,e=p[r];e&&("object"===typeof e&&"function"===typeof e.toJSON)&&(e=e.toJSON(r));"function"===typeof m&&(e=m.call(p,r,e));switch(typeof e){case "string":return t(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e);
+case "object":if(!e)return"null";c+=h;l=[];if("[object Array]"===Object.prototype.toString.apply(e)){n=e.length;for(f=0;f<n;f+=1)l[f]=q(f,e)||"null";j=0===l.length?"[]":c?"[\n"+c+l.join(",\n"+c)+"\n"+s+"]":"["+l.join(",")+"]";c=s;return j}if(m&&"object"===typeof m){n=m.length;for(f=0;f<n;f+=1)k=m[f],"string"===typeof k&&(j=q(k,e))&&l.push(t(k)+(c?": ":":")+j)}else for(k in e)Object.hasOwnProperty.call(e,k)&&(j=q(k,e))&&l.push(t(k)+(c?": ":":")+j);j=0===l.length?"{}":c?"{\n"+c+l.join(",\n"+c)+"\n"+
+s+"}":"{"+l.join(",")+"}";c=s;return j}}window.JSON||(window.JSON={});"function"!==typeof String.prototype.toJSON&&(String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var v=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c,h,D={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},m;"function"!==typeof JSON.stringify&&(JSON.stringify=function(r,
+p,f){var k;h=c="";if(typeof f==="number")for(k=0;k<f;k=k+1)h=h+" ";else typeof f==="string"&&(h=f);if((m=p)&&typeof p!=="function"&&(typeof p!=="object"||typeof p.length!=="number"))throw Error("JSON.stringify");return q("",{"":r})});"function"!==typeof JSON.parse&&(JSON.parse=function(c){return eval("("+c+")")})}();
+window.PUBNUB||function(){function t(){return"x"+ ++S+""+ +new Date}function q(){return+new Date}function v(a,b){var d,c=0,e=function(){c+b>q()?(clearTimeout(d),d=setTimeout(e,b)):(c=q(),a())};return e}function c(a){return document.getElementById(a)}function h(a){console.log(a)}function D(a,b){var d=[];m(a.split(/\s+/),function(a){m((b||document).getElementsByTagName(a),function(a){d.push(a)})});return d}function m(a,b){if(a&&b)if("undefined"!=typeof a[0])for(var d=0,c=a.length;d<c;)b.call(a[d],a[d],
+d++);else for(d in a)a.hasOwnProperty&&a.hasOwnProperty(d)&&b.call(a[d],d,a[d])}function r(a,b){var d=[];m(a||[],function(a,c){d.push(b(a,c))});return d}function p(a,b){return a.replace(T,function(a,c){return b[c]||a})}function f(a,b,d){m(a.split(","),function(a){var c=function(a){a||(a=window.event);d(a)||(a.cancelBubble=!0,a.returnValue=!1,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())};b.addEventListener?b.addEventListener(a,c,!1):b.attachEvent?b.attachEvent("on"+
+a,c):b["on"+a]=c})}function k(){return D("head")[0]}function j(a,b,c){if(c)a.setAttribute(b,c);else return a&&a.getAttribute&&a.getAttribute(b)}function n(a,b){for(var c in b)if(b.hasOwnProperty(c))try{a.style[c]=b[c]+(0<"|width|height|top|left|".indexOf(c)&&"number"==typeof b[c]?"px":"")}catch(e){}}function s(a){return document.createElement(a)}function l(){return F||o()?0:t()}function e(a){return r(encodeURIComponent(a).split(""),function(a){return 0>"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}
+function w(a){if(F||o()){a:{var b,d,e=function(){if(!h){h=1;clearTimeout(l);try{d=JSON.parse(b.responseText)}catch(a){return u(1)}U(d)}},f=0,h=0,l=setTimeout(function(){u(1)},G),m=a.fail||function(){},U=a.success||function(){},u=function(a){f||(f=1,clearTimeout(l),b&&(b.onerror=b.onload=null,b.abort&&b.abort(),b=null),a&&m())};try{b=o()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){u(1)};b.onload=b.onloadend=e;b.timeout=G;url=a.url.join(L);if(a.data)for(key in url+=
+"?",a.data)url+=key+"="+a.data[key]+"&";b.open("GET",url,!0);b.send()}catch(V){u(0);F=0;a=w(a);break a}a=u}return a}var g=s("script"),e=a.callback,M=t(),N=0,p=setTimeout(function(){i(1)},G),q=a.fail||function(){},r=a.success||function(){},i=function(a,b){N||(N=1,a||r(b),g.onerror=null,clearTimeout(p),setTimeout(function(){a&&q();var b=c(M),u=b&&b.parentNode;u&&u.removeChild(b)},B))};window[e]=function(a){i(0,a)};g[O]=O;g.onerror=function(){i(1)};g.src=a.url.join(L);if(a.data)for(key in g.src+="?",
+a.data)g.src+=key+"="+a.data[key]+"&";j(g,"id",M);k().appendChild(g);return i}function H(){PUBNUB.time(q);PUBNUB.time(function(){setTimeout(function(){I||(I=1,m(P,function(a){a[2].subscribe(a[0],a[1])}))},B)})}function o(){if(!Q.get)return 0;var a={id:o.id++,send:function(){},abort:function(){a.id={}},open:function(b,c){o[a.id]=a;Q.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||function(){});var x,E=window.localStorage;
+x={get:function(a){try{return E?E.getItem(a):-1==document.cookie.indexOf(a)?null:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||null}catch(b){}},set:function(a,b){try{if(E)return E.setItem(a,b)&&0;document.cookie=a+"="+b+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(c){}}};var S=1,T=/{([\w\-]+)}/g,O="async",L="/",G=31E4,B=1E3,F=-1==navigator.userAgent.indexOf("MSIE 6"),J,K=Math.floor(9*Math.random())+1;J=function(a){return 0<a.indexOf("pubsub")&&a.replace("pubsub","ps"+(10>++K?
+K:K=1))||a};var C={list:{},unbind:function(a){C.list[a]=[]},bind:function(a,b){(C.list[a]=C.list[a]||[]).push(b)},fire:function(a,b){m(C.list[a]||[],function(a){a(b)})}},i=c("pubnub")||{},I=0,P=[],R=function(a){var b={},d=a.publish_key||"",i=a.subscribe_key||"",o=a.ssl?"s":"",y=a.uuid||x.get(i+"uuid")||"",z="http"+o+"://"+(a.origin||"pubsub.pubnub.com"),A={history:function(a,b){var b=a.callback||b,c=a.limit||100,g=a.channel,d=l();if(!g)return h("Missing Channel");if(!b)return h("Missing Callback");
+w({callback:d,url:[z,"history",i,e(g),d,c],success:function(a){b(a)},fail:function(a){h(a)}})},time:function(a){var b=l();w({callback:b,url:[z,"time",b],success:function(b){a(b[0])},fail:function(){a(0)}})},uuid:function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)});a&&a(b);return b},publish:function(a,b){var b=b||a.callback||function(){},c=a.message,g=a.channel,f=l();if(!c)return h("Missing Message");if(!g)return h("Missing Channel");
+if(!d)return h("Missing Publish Key");c=JSON.stringify(c);c=[z,"publish",d,i,0,e(g),f,e(c)];w({callback:f,success:function(a){b(a)},fail:function(){b([0,"Disconnected"])},url:c,data:{uuid:y}})},unsubscribe:function(a){function c(a){a in b&&(b[a].connected=0,b[a].done&&b[a].done(0))}c(a.channel);c(a.channel+"-pnpres")},subscribe:function(a,c){function d(){var a=l();b[g].connected&&(b[g].done=w({callback:a,url:[v,"subscribe",f,e(g),a,k],data:{uuid:y},fail:function(){n||(n=1,r());setTimeout(d,B);A.time(function(a){if(a&&
+n){n=0;o()}else p()})},success:function(a){b[g].connected&&(s||(s=1,q()),n&&(n=0,o()),j=x.set(i+g,k=j&&x.get(f+g)||a[1]),m(a[0],function(b){c(b,a)}),setTimeout(d,10))}}))}var g=a.channel,c=c||a.callback,f=a.subscribe_key||i,j=a.restore,k=0,p=a.error||function(){},q=a.connect||function(){},o=a.reconnect||function(){},r=a.disconnect||function(){},t=a.presence||function(){},n=0,s=0,v=J(z);if(!I)return P.push([a,c,A]);if(!g)return h("Missing Channel");if(!c)return h("Missing Callback");if(!i)return h("Missing Subscribe Key");
+g in b||(b[g]={});if(b[g].connected)return h("Already Connected");b[g].connected=1;a.presence&&A.subscribe({channel:a.channel+"-pnpres",callback:t,restore:a.restore});d()},here_now:function(a,b){var b=a.callback||b,c=a.channel,d=l(),f=J(z);if(!c)return h("Missing Channel");if(!b)return h("Missing Callback");data=null;"0"!=d&&(data.callback=d);w({callback:d,url:[f,"v2","presence","sub_key",i,"channel",e(c)],data:data,success:function(a){b(a)},fail:function(a){h(a)}})},xdr:w,ready:H,db:x,each:m,map:r,
+css:n,$:c,create:s,bind:f,supplant:p,head:k,search:D,attr:j,now:q,unique:t,events:C,updater:v,init:R};""==y&&(y=A.uuid());x.set(i+"uuid",y);return A};PUBNUB=R({publish_key:j(i,"pub-key"),subscribe_key:j(i,"sub-key"),ssl:"on"==j(i,"ssl"),origin:j(i,"origin"),uuid:j(i,"uuid")});n(i,{position:"absolute",top:-B});if("opera"in window||j(i,"flash"))i.innerHTML="<object id=pubnubs data=https://dh15atwfs066y.cloudfront.net/pubnub.swf><param name=movie value=https://dh15atwfs066y.cloudfront.net/pubnub.swf><param name=allowscriptaccess value=always></object>";
+var Q=c("pubnubs")||{};f("load",window,function(){setTimeout(H,0)});PUBNUB.rdx=function(a,b){if(!b)return o[a].onerror();o[a].responseText=unescape(b);o[a].onload()};o.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&H()}();
View
6 javascript/3.2/tests/test.sh
@@ -1,7 +1,7 @@
#!/bin/bash
## ------------------------------------------------
-## PubNub 3.1 Real-time Cloud Push API - JAVASCRIPT
+## PubNub 3.2 Real-time Cloud Push API - JAVASCRIPT
## ------------------------------------------------
## ----------------------------------------------------
@@ -33,9 +33,9 @@ browsers=$browsers',safari/5.1'
echo -e "Testing: $browsers"
-noinstrument='pubnub-3.1.js,test.js'
+noinstrument='pubnub-3.2.js,test.js'
-tar -cf- test.js ../pubnub-3.1.js | \
+tar -cf- test.js ../pubnub-3.2.js | \
curl -u $1 -sSNT- \
"testling.com/?noinstrument=$noinstrument&browsers=$browsers"
View
6 javascript/pubnub-3.2.js
@@ -561,7 +561,7 @@ function xdr( setup ) {
* });
*/
function ajax( setup ) {
- var xhr
+ var xhr, response
, finished = function() {
if (loaded) return;
loaded = 1;
@@ -813,7 +813,7 @@ var PDIV = $('pubnub') || {}
disconnected = 1;
disconnect();
}
- timeout( pubnub, SECOND );
+ timeout( _connect, SECOND );
SELF['time'](function(success){
// Reconnect
if (success && disconnected) {
@@ -853,7 +853,7 @@ var PDIV = $('pubnub') || {}
callback( msg, messages );
} );
- timeout( pubnub, 10 );
+ timeout( _connect, 10 );
}
});
}
View
BIN  javascript/pubnub-3.2.min.js
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.