PageSourceSearch

https://cdn-assets.hanamal25.com/assets/controllers/auto_submit_controller-a826223d.js

js hanamal25.com collected 2026-10-09 03:20:43 UTC 734 bytes, 19 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// Submits the form as she types, debounced — the search box types straight into the
4// URL. Sibling to autosave_controller (which buffers edits); same timer idiom.
5export default class extends Controller {
6  static values = { delay: { type: Number, default: 300 } }
7
8  submit() {
9    // Mounted on a form, `element.form` is undefined and we submit the element itself; mounted
10    // on a control (a checkbox associated to a form via `form=`), `element.form` is that form.
11    const form = this.element.form || this.element
12    clearTimeout(this.timer)
13    this.timer = setTimeout(() => form.requestSubmit(), this.delayValue)
14  }
15
16  disconnect() {
17    clearTimeout(this.timer)
18  }
19}

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.