Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SSL fix provided by @brettveenstra which allows SSL support with usin…

…g the JS <script> file in the <head> tags.
  • Loading branch information...
commit 80f07a6ee60dd4a5e703b9cf7ddce2515bfff4dd 1 parent 1073d49
Stephen L. Blum stephenlb authored
6 app-showcase/content-commander/m-commander.html
View
@@ -191,8 +191,8 @@
$("#demo_info_button").click( toggleDemoInfo );
$("#notifications_button").click( toggleNotifications );
- $("#demo_info_button").touchUp( toggleDemoInfo );
- $("#notifications_button").touchUp( toggleNotifications );
+ //$("#demo_info_button").touchUp( toggleDemoInfo );
+ //$("#notifications_button").touchUp( toggleNotifications );
</script>
</div><!-- /page #main -->
@@ -275,7 +275,7 @@
<!-- PUBNUB -->
- <div pub-key="pub-550ff6a3-aa50-466c-a2c7-55a6c3fa3345" sub-key="sub-f3307e99-6a4a-11e1-870f-affeca838b29" ssl="off" origin="pubsub.pubnub.com" id="pubnub"></div>
+ <div pub-key="pub-7dbb570c-16fa-4bb7-8478-b632bb510472" sub-key="sub-c9ce8494-d8b6-11e0-9367-bbbbf064f5b3" ssl="off" origin="pubsub.pubnub.com" id="pubnub"></div>
<script src="http://cdn.pubnub.com/pubnub-3.1.min.js"></script>
<script>(function(){
4 app-showcase/content-commander/package.json
View
@@ -1,6 +1,6 @@
{
"description": "a little demo",
- "version": "1.3.0",
+ "version": "1.3.0-4",
"dependencies": {
"union": "0.1.7",
"flatiron": "0.1.11",
@@ -16,4 +16,4 @@
"engines": {
"node": "v0.6.x"
}
-}
+}
2  javascript/3.1/pubnub-3.1.js
View
@@ -872,7 +872,7 @@ var PDIV = $('pubnub') || {}
PUBNUB = CREATE_PUBNUB({
'publish_key' : attr( PDIV, 'pub-key' ),
'subscribe_key' : attr( PDIV, 'sub-key' ),
- 'ssl' : attr( PDIV, 'ssl' ) == 'on',
+ 'ssl' : attr( PDIV, 'ssl' ) == 'on' || !document.location.href.indexOf('https'),
'origin' : attr( PDIV, 'origin' )
});
2  javascript/3.2/pubnub-3.2.js
View
@@ -926,7 +926,7 @@ var PDIV = $('pubnub') || {}
PUBNUB = CREATE_PUBNUB({
'publish_key' : attr( PDIV, 'pub-key' ),
'subscribe_key' : attr( PDIV, 'sub-key' ),
- 'ssl' : attr( PDIV, 'ssl' ) == 'on',
+ 'ssl' : attr( PDIV, 'ssl' ) == 'on' || !document.location.href.indexOf('https'),
'origin' : attr( PDIV, 'origin' ),
'uuid' : attr( PDIV, 'uuid' )
});
2  javascript/3.3/pubnub-3.3.js
View
@@ -971,7 +971,7 @@ var PDIV = $('pubnub') || {}
PUBNUB = CREATE_PUBNUB({
'publish_key' : attr( PDIV, 'pub-key' ),
'subscribe_key' : attr( PDIV, 'sub-key' ),
- 'ssl' : attr( PDIV, 'ssl' ) == 'on',
+ 'ssl' : attr( PDIV, 'ssl' ) == 'on' || !document.location.href.indexOf('https'),
'origin' : attr( PDIV, 'origin' ),
'uuid' : attr( PDIV, 'uuid' )
});
6 javascript/3.3/pubnub-3.3.min.js
View
@@ -1,3 +1,4 @@
+(function(){
window.JSON&&window.JSON.stringify||function(){function u(c){w.lastIndex=0;return w.test(c)?'"'+c.replace(w,function(c){var d=D[c];return"string"===typeof d?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function q(r,p){var d,g,j,m,t=i,l,e=p[r];e&&("object"===typeof e&&"function"===typeof e.toJSON)&&(e=e.toJSON(r));"function"===typeof k&&(e=k.call(p,r,e));switch(typeof e){case "string":return u(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e);
case "object":if(!e)return"null";i+=c;l=[];if("[object Array]"===Object.prototype.toString.apply(e)){m=e.length;for(d=0;d<m;d+=1)l[d]=q(d,e)||"null";j=0===l.length?"[]":i?"[\n"+i+l.join(",\n"+i)+"\n"+t+"]":"["+l.join(",")+"]";i=t;return j}if(k&&"object"===typeof k){m=k.length;for(d=0;d<m;d+=1)g=k[d],"string"===typeof g&&(j=q(g,e))&&l.push(u(g)+(i?": ":":")+j)}else for(g in e)Object.hasOwnProperty.call(e,g)&&(j=q(g,e))&&l.push(u(g)+(i?": ":":")+j);j=0===l.length?"{}":i?"{\n"+i+l.join(",\n"+i)+"\n"+
t+"}":"{"+l.join(",")+"}";i=t;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 w=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i,c,D={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(r,
@@ -15,5 +16,6 @@ time:function(a){var b=l();v({callback:b,url:[x,"time",b],success:function(b){a(
h,s,0,e(f),g,e(d)];v({callback:g,success:function(a){b(a)},fail:function(){b([0,"Disconnected"])},url:d,data:{uuid:o}})},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,d){function g(){var a=l();b[f].connected&&(b[f].done=v({callback:a,url:[w,"subscribe",h,e(f),a,j],data:{uuid:o},fail:function(){m||(m=1,r());setTimeout(g,B);A.time(function(a){if(a&&m){m=0;n()}else p()})},success:function(a){b[f].connected&&
(t||(t=1,q()),m&&(m=0,n()),i=y.set(s+f,j=i&&y.get(h+f)||a[1]),k(a[0],function(b){d(b,a)}),setTimeout(g,10))}}))}var f=a.channel,d=d||a.callback,h=a.subscribe_key||s,i=a.restore,j=0,p=a.error||function(){},q=a.connect||function(){},n=a.reconnect||function(){},r=a.disconnect||function(){},u=a.presence||function(){},m=0,t=0,w=K(x);if(!J)return S.push([a,d,A]);if(!f)return c("Missing Channel");if(!d)return c("Missing Callback");if(!s)return c("Missing Subscribe Key");f in b||(b[f]={});if(b[f].connected)return c("Already Connected");
b[f].connected=1;a.presence&&A.subscribe({channel:a.channel+"-pnpres",callback:u,restore:a.restore});g()},here_now:function(a,b){var b=a.callback||b,d=a.channel,f=l(),g=K(x);if(!d)return c("Missing Channel");if(!b)return c("Missing Callback");data=null;"0"!=f&&(data.callback=f);v({callback:f,url:[g,"v2","presence","sub_key",s,"channel",e(d)],data:data,success:function(a){b(a)},fail:function(a){c(a)}})},xdr:v,ready:I,db:y,each:k,map:r,css:m,$:i,create:t,bind:d,supplant:p,head:g,search:D,attr:j,now:q,
-unique:u,events:C,updater:w,init:U};""==o&&(o=A.uuid());y.set(s+"uuid",o);return A};PUBNUB=U({publish_key:j(o,"pub-key"),subscribe_key:j(o,"sub-key"),ssl:"on"==j(o,"ssl"),origin:j(o,"origin"),uuid:j(o,"uuid")});m(o,{position:"absolute",top:-B});if("opera"in window||j(o,"flash"))o.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 T=i("pubnubs")||
-{};d("load",window,function(){setTimeout(I,0)});PUBNUB.rdx=function(a,b){if(!b)return n[a].onerror();n[a].responseText=unescape(b);n[a].onload()};n.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&I()}();
+unique:u,events:C,updater:w,init:U};""==o&&(o=A.uuid());y.set(s+"uuid",o);return A};PUBNUB=U({publish_key:j(o,"pub-key"),subscribe_key:j(o,"sub-key"),ssl:"on"==j(o,"ssl")||!document.location.href.indexOf("https"),origin:j(o,"origin"),uuid:j(o,"uuid")});m(o,{position:"absolute",top:-B});if("opera"in window||j(o,"flash"))o.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 T=i("pubnubs")||{};d("load",window,function(){setTimeout(I,0)});PUBNUB.rdx=function(a,b){if(!b)return n[a].onerror();n[a].responseText=unescape(b);n[a].onload()};n.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&I()}();
+})();
2  javascript/pubnub-3.3.js
View
@@ -971,7 +971,7 @@ var PDIV = $('pubnub') || {}
PUBNUB = CREATE_PUBNUB({
'publish_key' : attr( PDIV, 'pub-key' ),
'subscribe_key' : attr( PDIV, 'sub-key' ),
- 'ssl' : attr( PDIV, 'ssl' ) == 'on',
+ 'ssl' : attr( PDIV, 'ssl' ) == 'on' || !document.location.href.indexOf('https'),
'origin' : attr( PDIV, 'origin' ),
'uuid' : attr( PDIV, 'uuid' )
});
6 javascript/pubnub-3.3.min.js
View
@@ -1,3 +1,4 @@
+(function(){
window.JSON&&window.JSON.stringify||function(){function u(c){w.lastIndex=0;return w.test(c)?'"'+c.replace(w,function(c){var d=D[c];return"string"===typeof d?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function q(r,p){var d,g,j,m,t=i,l,e=p[r];e&&("object"===typeof e&&"function"===typeof e.toJSON)&&(e=e.toJSON(r));"function"===typeof k&&(e=k.call(p,r,e));switch(typeof e){case "string":return u(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e);
case "object":if(!e)return"null";i+=c;l=[];if("[object Array]"===Object.prototype.toString.apply(e)){m=e.length;for(d=0;d<m;d+=1)l[d]=q(d,e)||"null";j=0===l.length?"[]":i?"[\n"+i+l.join(",\n"+i)+"\n"+t+"]":"["+l.join(",")+"]";i=t;return j}if(k&&"object"===typeof k){m=k.length;for(d=0;d<m;d+=1)g=k[d],"string"===typeof g&&(j=q(g,e))&&l.push(u(g)+(i?": ":":")+j)}else for(g in e)Object.hasOwnProperty.call(e,g)&&(j=q(g,e))&&l.push(u(g)+(i?": ":":")+j);j=0===l.length?"{}":i?"{\n"+i+l.join(",\n"+i)+"\n"+
t+"}":"{"+l.join(",")+"}";i=t;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 w=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i,c,D={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(r,
@@ -15,5 +16,6 @@ time:function(a){var b=l();v({callback:b,url:[x,"time",b],success:function(b){a(
h,s,0,e(f),g,e(d)];v({callback:g,success:function(a){b(a)},fail:function(){b([0,"Disconnected"])},url:d,data:{uuid:o}})},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,d){function g(){var a=l();b[f].connected&&(b[f].done=v({callback:a,url:[w,"subscribe",h,e(f),a,j],data:{uuid:o},fail:function(){m||(m=1,r());setTimeout(g,B);A.time(function(a){if(a&&m){m=0;n()}else p()})},success:function(a){b[f].connected&&
(t||(t=1,q()),m&&(m=0,n()),i=y.set(s+f,j=i&&y.get(h+f)||a[1]),k(a[0],function(b){d(b,a)}),setTimeout(g,10))}}))}var f=a.channel,d=d||a.callback,h=a.subscribe_key||s,i=a.restore,j=0,p=a.error||function(){},q=a.connect||function(){},n=a.reconnect||function(){},r=a.disconnect||function(){},u=a.presence||function(){},m=0,t=0,w=K(x);if(!J)return S.push([a,d,A]);if(!f)return c("Missing Channel");if(!d)return c("Missing Callback");if(!s)return c("Missing Subscribe Key");f in b||(b[f]={});if(b[f].connected)return c("Already Connected");
b[f].connected=1;a.presence&&A.subscribe({channel:a.channel+"-pnpres",callback:u,restore:a.restore});g()},here_now:function(a,b){var b=a.callback||b,d=a.channel,f=l(),g=K(x);if(!d)return c("Missing Channel");if(!b)return c("Missing Callback");data=null;"0"!=f&&(data.callback=f);v({callback:f,url:[g,"v2","presence","sub_key",s,"channel",e(d)],data:data,success:function(a){b(a)},fail:function(a){c(a)}})},xdr:v,ready:I,db:y,each:k,map:r,css:m,$:i,create:t,bind:d,supplant:p,head:g,search:D,attr:j,now:q,
-unique:u,events:C,updater:w,init:U};""==o&&(o=A.uuid());y.set(s+"uuid",o);return A};PUBNUB=U({publish_key:j(o,"pub-key"),subscribe_key:j(o,"sub-key"),ssl:"on"==j(o,"ssl"),origin:j(o,"origin"),uuid:j(o,"uuid")});m(o,{position:"absolute",top:-B});if("opera"in window||j(o,"flash"))o.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 T=i("pubnubs")||
-{};d("load",window,function(){setTimeout(I,0)});PUBNUB.rdx=function(a,b){if(!b)return n[a].onerror();n[a].responseText=unescape(b);n[a].onload()};n.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&I()}();
+unique:u,events:C,updater:w,init:U};""==o&&(o=A.uuid());y.set(s+"uuid",o);return A};PUBNUB=U({publish_key:j(o,"pub-key"),subscribe_key:j(o,"sub-key"),ssl:"on"==j(o,"ssl")||!document.location.href.indexOf("https"),origin:j(o,"origin"),uuid:j(o,"uuid")});m(o,{position:"absolute",top:-B});if("opera"in window||j(o,"flash"))o.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 T=i("pubnubs")||{};d("load",window,function(){setTimeout(I,0)});PUBNUB.rdx=function(a,b){if(!b)return n[a].onerror();n[a].responseText=unescape(b);n[a].onload()};n.id=B;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);"undefined"!==typeof module&&(module.exports=PUBNUB)&&I()}();
+})();
Please sign in to comment.
Something went wrong with that request. Please try again.