PageSourceSearch

https://minm.co/assets/controllers/toggle_display_controller-b8e7e…cdb983399f42f13c29bb2032e3551e80cac51ff2.js

js minm.co collected 2026-10-02 10:18:11 UTC 635 bytes, 24 lines download raw bytes

1import { Controller } from '@hotwired/stimulus'
2
3export default class ToggleDisplayController extends Controller {
4  show() {
5    if (this.hasInitialTarget)
6      this.initialTargets.forEach(x => x.style.display = 'none')
7    this.hiddenTargets.forEach(x => x.style.display = null)
8  }
9
10  hide() {
11    if (this.hasInitialTarget)
12      this.initialTargets.forEach(x => x.style.display = null)
13    this.hiddenTargets.forEach(x => x.style.display = 'none')
14  }
15  
16  toggle() {
17    if (this.hiddenTarget.style.display === 'none')
18      this.show()
19    else
20      this.hide()
21  }
22}
23
24ToggleDisplayController.targets = ['initial', 'hidden'];

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.