HubSpot/offline — pull request #56 by craigshoemaker (2014-03-17 20:29:53+00:00)
Title: Added offline.simulator.js

This module adds a feature which allows you to test how your pages respond to different connectivity states without having to use brute-force methods to disable your actual connectivity.
- - -
The `offline.simulator.js` module allows you to simulate being online or offline at development-time by making the indicator click-able. Clicking the indicator tells Offline.js to mark itself as offline if the current state is “up” and vice versa.

![image](https://f.cloud.github.com/assets/127797/2441205/eb3e50dc-ae10-11e3-85b0-1c42ad6a02e5.png) or ![image](https://f.cloud.github.com/assets/127797/2441211/0a9a1114-ae11-11e3-91c0-de00b2179ee5.png)

The module also includes a way to easily force all checks to fail (and therefore simulate being offline) by adding the option to include the `data-force-fail="true"` attribute to the including `script` element. For example:

``

There are no dependencies for this script and it even reminds developers to remove the script in production contexts:

![image](https://f.cloud.github.com/assets/127797/2441245/9b9a134e-ae11-11e3-86c8-21c210328a00.png)