Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- checkPopup() {
- const check = setInterval(() => {
- const { popup } = this
- if (!popup || popup.closed || popup.closed === undefined) {
- clearInterval(check);
- this.setState({ disabled: ''})
- }
- }, 1000)
- }
- openPopup() {
- const width = 600, height = 600
- const left = (window.innerWidth / 2) - (width / 2)
- const top = (window.innerHeight / 2) - (height / 2)
- const url = `${API_URL}/twitter?socketId=${socket.id}`
- return window.open(url, '',
- `toolbar=no, location=no, directories=no, status=no, menubar=no,
- scrollbars=no, resizable=no, copyhistory=no, width=${width},
- height=${height}, top=${top}, left=${left}`
- )
- }
Add Comment
Please, Sign In to add comment