PageSourceSearch

https://proxy.useonward.com/assets/controllers/toggle_by_value_controller-26eee552.js

js useonward.com collected 2026-09-30 18:54:57 UTC 512 bytes, 22 lines download raw bytes

1import { Controller } from "@hotwired/stimulus";
2
3export default class extends Controller {
4  static targets = ["control", "toggleable"]
5
6  connect() {
7    this.render()
8  }
9
10  render() {
11    const value = this.controlTarget.value
12
13    this.toggleableTargets.forEach(toggleable => {
14      const toggleFor = JSON.parse(toggleable.dataset.toggleFor)
15      if (toggleFor.includes(value)) {
16        toggleable.classList.remove("hidden")
17      } else {
18        toggleable.classList.add("hidden")
19      }
20    })
21  }
22}

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.