add push.js framework

This commit is contained in:
David Todd 2018-12-19 01:35:11 -06:00
parent 813970db79
commit b325525060
1 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,8 @@
<head>
<title>Pusher Test</title>
<script src="https://js.pusher.com/4.1/pusher.min.js"></script>
<script src="https://raw.githubusercontent.com/Nickersoft/push.js/master/bin/push.min.js" type="text/javascript"></script>
<script>
// Enable pusher logging - don't include this in production
@ -14,10 +16,12 @@
var channel = pusher.subscribe('<?php echo $_GET['channel']; ?>');
channel.bind('my-event', function(data) {
alert(data.message);
Push.create(data.message);
});
</script>
</head>
</head>
Your notify link: <a href="https://dev.c0defox.es/push/?channel=<?php echo $_GET['channel']; ?>">Get Notified</a>