https://github.com/helloworld017/restaurance
A package to send all elements to the Heroes of the Storm.
https://github.com/helloworld017/restaurance
Last synced: about 1 year ago
JSON representation
A package to send all elements to the Heroes of the Storm.
- Host: GitHub
- URL: https://github.com/helloworld017/restaurance
- Owner: HelloWorld017
- Created: 2017-07-07T11:02:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T22:36:58.000Z (over 7 years ago)
- Last Synced: 2025-04-24T12:02:53.730Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.4 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Restaurance

A package to send elements to the Heroes of the Storm.
## Installation
### In a browser
```html
```
### via NPM
```js
import restaurance from "restaurance"; //ES6
const restaurance = require("restaurance"); //CommonJS, ES6
var restaurance = require("restaurance"); //CommonJS
//etc...
```
## Documentation
### restaurance([hotsImage : Object[, elems : Array[, duration : Number]]])
Kidnap elements into the `Heroes of the Storm` and show advertisement of the `Heroes of the Storm`.
#### Arguments
##### hotsImage
An object which contains data of hots image.
default:
```js
{
width: 150,
height: 150,
x: (window.innerWidth - width) / 2,
y: (window.innerHeight - width) / 2
}
```
##### elems
An array which contains selectors or elements which will be kidnapped into the `Heroes of the Storm`.
default:
All elements which don't have any children.
##### duration
The duration(seconds) of the kidnapping animation.
It should be more than 2s.
default:
`30`
## [Examples](https://HelloWorld017.github.io/restaurance/)