Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
49 lines (38 loc) · 1.18 KB

File metadata and controls

49 lines (38 loc) · 1.18 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src=../pubnub.min.js></script>
<script>
var setup = {"origin":"multiplexing.pubnub.com", "subscribe_key":"demo", "publish_key":"demo"};
var p = PUBNUB(setup);
// LISTEN
p.subscribe({
channel:"mx_a,mx_b,mx_c",
callback:function (msg) {
console.log(msg)
},
connect:publish_to_mx_a
})
//alert("Watch console.log for receipt of three publishes on a single channel!");
function publish_to_mx_a() {
// Publish to channel a
p.publish({
channel:"mx_a",
message:"Vitamin A (or Vitamin A Retinol, retinal, and four!",
callback:publish_to_mx_b
})
}
// Publish to channel b
function publish_to_mx_b() {
p.publish({
channel:"mx_b",
message:"Vitamin B vitamins are a group of water-soluble!",
callback:publish_to_mx_c
});
}
function publish_to_mx_c() {
// Publish to channel c
p.publish({
channel:"mx_c",
message:"Vitamin C or L-ascorbic acid, or simply ascorbate!"
})
}
</script>
Morty Proxy This is a proxified and sanitized view of the page, visit original site.