1.2.5 • Published 5 months ago

@aamasri/busy v1.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

  1. Download & copy this package's "dist" folder into your web server's public folder eg. public/js/dist/*.
  2. Rename "dist" to "busy" eg. public/js/busy
  3. Load the busy script at the end of your web page (before the closing body tag) like this:
<body>
    ...

    <script src="/js/busy/busy.js"></script>
</body>
</html>
  1. When the browser loads, busy will be attached to the browser's global window object. Use it anywhere in your scripts like this:

<button>Target</button>

<script>
    busy.start('test-1', 15);         // start a loader
    busy.start('test-2', 60);         // register another loader

    ...

    busy.stop('test-1');              // stop the specified loader
    
    ...
    
    busy.reset();                     // clear all loaders
</script>

Then import and use it in your project's ES6 modules:

function fetchDataFromApi() { busy.start('fetching data', 10, true); }

Busy supports npm under the name @aamasri/busy.

Publishing Updates

1.2.5

5 months ago

1.2.4

5 months ago

1.2.0

6 months ago

1.1.0

7 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago