feat: uses web components to simplify javascript logic

This commit is contained in:
2025-07-24 17:05:19 -05:00
parent 65acd5d21b
commit 566886ef0e
6 changed files with 6 additions and 64 deletions

View File

@@ -1,7 +1,4 @@
export default class EpisodeContainer extends HTMLElement {
H264_CODECS = ['h264', 'h.264', 'x264']
H265_CODECS = ['h265', 'h.265', 'x265', 'hevc']
options = [];
showTitle;
@@ -27,19 +24,6 @@ export default class EpisodeContainer extends HTMLElement {
document.addEventListener('downloadSelectedEpisodes', this.downloadSelectedResults.bind(this));
document.addEventListener('selectEpisodeForDownload', (e) => this.selectEpisodeForDownload(e.detail.select));
}
connectedCallback() {
}
// attribute change
attributeChangedCallback(property, oldValue, newValue) {
if (oldValue === newValue) return;
this[ property ] = newValue;
}
static get observedAttributes() {
return ['name'];
}
toggleResults() {
this.#resultsToggleBtnEl.classList.toggle('rotate-90');