-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
39 lines (32 loc) · 1.17 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import './assets/endmysuffering.css';
import * as utils from './utils.js';
import * as Tweakpane from './tweakpane.js';
window.addEventListener('load', async () => {
console.log('Hello, world!');
// embed twitch player
const script = document.createElement('script');
script.setAttribute('src', 'https://embed.twitch.tv/embed/v1.js');
document.body.appendChild(script);
if (DataStore.get('rgba-val') == null) {
DataStore.set('rgba-val', '#0009');
}
window.Effect.apply('unified', {
color: `${DataStore.get('rgba-val')}`,
});
const div = document.createElement('div');
let element = document.createElement('div');
div.classList.add('tweakpane-container-wrapper');
element.classList.add('tweakpane-container');
element.style.width = '300px';
element.style.top = '20px';
element.style.left = '20px';
div.appendChild(element);
document.body.appendChild(div);
// utils.makeDraggable(element);
element.ariaReadOnly = false;
element.disable = false;
while (!(await utils.getUsername())) {
await new Promise((resolve) => setTimeout(resolve, 1000));
}
Tweakpane.getTweakPaneReady(await utils.getUsername());
});