Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Central render function. Resets state and renders the appropriate background.
- export function render(bg?: BackgroundStore) {
- container.innerHTML = ''
- style.innerHTML = ''
- let showOPBG = false
- if (options.illyaDance) {
- renderIllya()
- showOPBG = true
- } else if (options.Happening) {
- renderHappening()
- showOPBG = true
- } else if (options.userBG && !options.workModeToggle) {
- renderBackground(bg)
- showOPBG = true
- }
- toggleOPBackground(showOPBG)
- }
- // Attach Illya Dance to the background
- function renderHappening() {
- let args = 'autoplay loop'
- if (options.HappeningMute) {
- args += ' muted'
- }
- const html = HTML
- `<video ${args}>
- <source src="/assets/happening.gif" type="image/gif">
- </video>`
- container.innerHTML = html
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement