-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
36 lines (33 loc) · 1.08 KB
/
index.js
File metadata and controls
36 lines (33 loc) · 1.08 KB
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
import './components/SlideIt/SlideIt.js';
import './components/VideoSpot/VideoSpot.js';
import './components/CommonToolbar/CommonToolbar.js';
import './components/GroupFrom/GroupFrom.js';
import styles from './common-css/styles.css.js';
import hlCss from './common-css/hl.css.js';
import { PubSub } from '@symbiotejs/symbiote';
let styleSheet = new CSSStyleSheet();
styleSheet.replaceSync(styles + hlCss);
document.adoptedStyleSheets = [...document.adoptedStyleSheets, styleSheet];
PubSub.registerCtx({
hideVideoSpot: false,
currentSlide: null,
drawColor: '#fff',
eraseMode: false,
}, 'APP');
window.onload = async () => {
let customStyles = document.querySelector('style');
if (customStyles) {
let css = customStyles.textContent;
if (css) {
let customStyleSheet = new CSSStyleSheet();
customStyleSheet.replaceSync(css);
document.adoptedStyleSheets = [...document.adoptedStyleSheets, customStyleSheet];
}
}
window.requestIdleCallback(() => {
let slideIt = document.querySelector('slide-it');
if (slideIt) {
slideIt.focus();
}
});
}