Skip to content

⚡ A small js library for websites to detect user's connection status.

License

Notifications You must be signed in to change notification settings

murshidazher/voltage.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

20e0651 · Jun 17, 2021

History

46 Commits
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 16, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021
Jun 17, 2021

Repository files navigation

travisci codecov code style: prettier

A library for websites to detect user's connection status. Certified Lit 🔥🔥 Accepting PRs

  • A simple JavaScript library to provide a functionality for websites to detect online / offline connection status.

Table of Contents

Installing / Getting started

A quick introduction of the minimal setup you need to get a up & running.

$ npm install voltage.js

Usage

Here's a brief intro about what a developer must do in order to start developing the project further:

Manually

  • Download the latest distribution from github release.
  • Add voltage.min.css and voltage.min.js to your html page.
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Voltage.JS Example</title>
    <link rel="stylesheet" href="voltage.min.css" />
  </head>
  <body>
    <div>Turn off your network to experience voltage.</div>

    <script src="voltage.min.js"></script>
  </body>
</html>

Using npm

An example implementation using react could be found here.

  • Add the latest npm package to the project.
  • Import voltage.css and voltage.js to your frontend.
import 'voltage.js/dist/css/voltage.css';
import 'voltage.js/dist/js/voltage.js';

Contributors

contributors

License

MIT © Murshid Azher.