Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dimensi/popup-centered
The little function for open window popup on center display
https://github.com/dimensi/popup-centered
Last synced: about 1 month ago
JSON representation
The little function for open window popup on center display
- Host: GitHub
- URL: https://github.com/dimensi/popup-centered
- Owner: dimensi
- License: mit
- Created: 2018-07-09T19:24:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T14:55:55.000Z (about 5 years ago)
- Last Synced: 2024-11-24T05:35:39.066Z (about 2 months ago)
- Language: TypeScript
- Size: 383 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# popup-centered
The little function for open window popup on center displaycreated by [this answer](https://stackoverflow.com/questions/4068373/center-a-popup-window-on-screen)
## Install
```sh
npm i popup-centered # or
yarn add popup-centered
```## Usage
```js
import popupCentered from 'popup-centered'
const popup = popupCentered('https://fb.com/', 'Facebook popup', 600, 400)
popup.close()
const popup2 = popupCentered('https://fb.com/', 'Facebook popup', {
width: 600,
height: 400,
menubar: 'no',
toolbar: 'no',
location: 'no,
})
popup2.close()
```