Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvshu/h5-check-update
H5 page checks for updates and alerts
https://github.com/dvshu/h5-check-update
Last synced: 2 months ago
JSON representation
H5 page checks for updates and alerts
- Host: GitHub
- URL: https://github.com/dvshu/h5-check-update
- Owner: DvShu
- License: mit
- Created: 2024-02-28T07:10:40.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-25T09:50:10.000Z (7 months ago)
- Last Synced: 2024-11-12T21:42:40.089Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# h5-check-update
H5 page checks for updates and alerts; The implementation detects changes in the hash of the index.js file introduced by the source server.
## Install
```shell
npm install h5-check-update
```## Usage
### 1. Import
In `src/main.js` or `src/index.js` add the following code
```javascript
import "h5-check-update";
```### 2. Worker
Save `check_update.worker.js` to the `public` directory
## Methods
```javascript
import { checkUpdate, destroy } from "h5-check-update";
```### 1. `checkUpdate()`
Check for updates; In general, you don't need to call this function, it is automatically called once when you introduce the file
### 2. `destroy()`
Stop checking for updates, close the worker, and free up resources.
## Command
### 1. `init`
1. import `h5-check-update`
2. add `check_update.worker.js`.example:
```shell
h5-check-update init
```