Skip to content

Commit 682625d

Browse files
author
gcohen
committed
Tweaking PAM demo
1 parent a088288 commit 682625d

2 files changed

Lines changed: 8 additions & 17 deletions

File tree

web/examples/pubnub_dev_console.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,11 @@ <h2>Please open Developer Tools->Console and click around below to begin</h2>
3838
<p>
3939

4040
<h3>Init Methods</h3>
41-
Init with demo keys:
42-
<button onclick='dev_console.init("pubsub.pubnub.com","demo","demo","demo","myAuthKey", false)'>Init</button>
43-
<code>dev_console.init("pubsub.pubnub.com","demo","demo","demo","myAuthKey", false)</code>
44-
45-
Init with PAM-enabled domain:
46-
<button onclick='dev_console.init("pam-beta.pubnub.com")'>Init</button>
47-
<code>dev_console.init("pam-beta.pubnub.com")</code>
4841

4942
Init with test PAM-enabled domain and default keys:
50-
<button onclick='dev_console.init("pam-beta.pubnub.com","pub-c-c077418d-f83c-4860-b213-2f6c77bde29a","sub-c-e8839098-f568-11e2-a11a-02ee2ddab7fe","sec-c-OGU3Y2Q4ZWUtNDQwMC00NTI1LThjNWYtNWJmY2M4OGIwNjEy","myAuthKey", true)'>
43+
<button onclick='dev_console.init("pam-next.devbuild.pubnub.com","pub-c-e72b633d-bb2f-42ba-8e98-69a9d3f7bdaa","sub-c-8e798456-4520-11e3-9b46-02ee2ddab7fe","sec-c-ZjFjZmRhODMtM2E5Yi00N2ViLWJjYTktMjk2NmExOTQyMmYz","myauthkey", false)'>
5144
Init
5245
</button>
53-
<code>dev_console.init("pam-beta.pubnub.com","pub-c-a2650a22-deb1-44f5-aa87-15170494d5","sub-c-a478dd2a-c33d-11e2-883f-02ee2ddab7fe","sec-c-YjFmNzYzMGMtYmI3NC00NzJkLTlkYzYtY2MwMzI4YTJhNDVh","myAuthKey",
54-
true)</code>
5546

5647
<h2>Output</h2>
5748
<button onclick='clearOutputs()'>Clear</button>

web/examples/pubnub_dev_console.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ pubnub_dev_console = function(){
103103
switch(input) {
104104

105105
case SUBSCRIBE:
106-
var channel = get_input("Enter channel", "string", "hello_world");
106+
var channel = get_input("Enter channel", "string", "mychannel");
107107
pubnub.subscribe({
108108
'channel' : channel,
109109
'callback' : print,
110110
'error' : error
111111
});
112112
break;
113113
case PUBLISH:
114-
var channel = get_input("Enter channel", "string", "hello_world");
114+
var channel = get_input("Enter channel", "string", "mychannel");
115115
var message = get_input("Enter Message", "string", "Hi");
116116
pubnub.publish({
117117
'channel' : channel,
@@ -121,7 +121,7 @@ pubnub_dev_console = function(){
121121
});
122122
break;
123123
case HISTORY:
124-
var channel = get_input("Enter channel", "string", "hello_world");
124+
var channel = get_input("Enter channel", "string", "mychannel");
125125
var count = get_input("Enter count", "number", 10);
126126
var reverse = get_input("Reverse ?", "boolean");
127127
pubnub.history({
@@ -133,15 +133,15 @@ pubnub_dev_console = function(){
133133
});
134134
break;
135135
case HERE_NOW:
136-
var channel = get_input("Enter channel", "string", "hello_world");
136+
var channel = get_input("Enter channel", "string", "mychannel");
137137
pubnub.here_now({
138138
'channel' : channel,
139139
'callback' : print,
140140
'error' : error
141141
});
142142
break;
143143
case UNSUBSCRIBE:
144-
var channel = get_input("Enter channel", "string", "hello_world");
144+
var channel = get_input("Enter channel", "string", "mychannel");
145145
pubnub.unsubscribe({
146146
'channel' : channel
147147
});
@@ -155,7 +155,7 @@ pubnub_dev_console = function(){
155155
document.getElementById('currentAuthKey').innerHTML="current auth key is: " + key;
156156
break;
157157
case PAM_GRANT:
158-
var channel = get_input("Enter channel", "string", "hello_world");
158+
var channel = get_input("Enter channel", "string", "mychannel");
159159
var key = getAuthKey();
160160
var read = get_input("Read Permission Allowed ?", "boolean");
161161
var write = get_input("Write Permission Allowed ?", "boolean");
@@ -171,7 +171,7 @@ pubnub_dev_console = function(){
171171
});
172172
break;
173173
case PAM_REVOKE:
174-
var channel = get_input("Enter channel", "string", "hello_world");
174+
var channel = get_input("Enter channel", "string", "mychannel");
175175
var key = getAuthKey();
176176
pubnub.revoke({
177177
'channel' : channel,

0 commit comments

Comments
 (0)