1import { Controller } from "@hotwired/stimulus"; 2 3export default class extends Controller { 4 static targets = ["input", "video"]; 5 6 filter() { 7 const query = this.inputTarget.value.toLowerCase().trim(); 8 9 this.videoTargets.forEach((video) => { 10 const title = video.dataset.title?.toLowerCase() || ""; 11 if (query === "" || title.includes(query)) { 12 video.classList.remove("hidden"); 13 } else { 14 video.classList.add("hidden"); 15 } 16 }); 17 } 18 19 clear() { 20 this.inputTarget.value = ""; 21 this.filter(); 22 } 23}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.