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 MovieContainer extends HTMLElement {
H264_CODECS = ['h264', 'h.264', 'x264']
H265_CODECS = ['h265', 'h.265', 'x265', 'hevc']
#resultsTableEl;
#resultsCountNumberEl;
@@ -13,12 +10,6 @@ export default class MovieContainer extends HTMLElement {
document.addEventListener('filterDownloadOptions', this.filter.bind(this));
}
// attribute change
attributeChangedCallback(property, oldValue, newValue) {
if (oldValue === newValue) return;
this[ property ] = newValue;
}
filter({ detail: { activeFilter } }) {
const options = this.querySelectorAll('tr.download-option');
let firstIncluded = true;