Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- 'use strict';
- console.log('lag check')
- const token = 'MY_TOKEN';
- const doRequest = (e) => {
- if (e.key !== '5') {return}
- console.log('go')
- fetch('https://lichess.org/api/stream/event', {
- headers:
- {
- Authorization: 'Bearer ' + token,
- },
- })
- .then(response => response.text())
- .then(data => console.log(data));
- }
- document.addEventListener('keydown', doRequest)
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement