This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To subscribe to an event, pass this JSON text to the client through the WebSocket: | |
{ | |
"body": { | |
"eventName": "NameOfEvent" // Replace with an event name listed below | |
}, | |
"header": { | |
"requestId": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx", // UUID | |
"messagePurpose": "subscribe", | |
"version": 1, // Protocol version (currently 1 as-of 1.0.2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assuming you already have NodeJS, npm and gulp installed | |
// and followed instructions at: | |
// https://www.browsersync.io/docs/gulp/ | |
// | |
// save this file at <<DJANGO PROJECT ROOT>> | |
// on your terminal: | |
// $ cd <<DJANGO PROJECT ROOT>> | |
// $ gulp | |
// this will open a browser window with your project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* inspired by jdduke (http://jsbin.com/qofuwa/2/edit) | |
*/ | |
var preventPullToRefresh = (function preventPullToRefresh(lastTouchY) { | |
lastTouchY = lastTouchY || 0; | |
var maybePrevent = false; |