-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
22 lines (18 loc) · 834 Bytes
/
Copy pathmain.js
File metadata and controls
22 lines (18 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { gizzSeed } from './seed.js';
import { createCalendar } from './calendar.js';
import { getSelectedAlbums } from './albumLogic.js';
document.querySelector("#enterSeedBtn").addEventListener('click', () => {
const seedInputValue = document.querySelector("#seedInput").value
let seed = seedInputValue == "" ? gizzSeed : seedInputValue
console.log(`Seed: ${seed}`)
createCalendar(seed, getSelectedAlbums())
const fixCheckboxState = (id, param) => {
const element = document.querySelector(id)
element.checked = seedInputValue.includes(param) ? true : false;
}
fixCheckboxState("#includeLive", "/L")
fixCheckboxState("#includeCompilations", "/C")
fixCheckboxState("#includeEps", "/E")
fixCheckboxState("#includeRemix", "/R")
})
createCalendar(gizzSeed, getSelectedAlbums())