PageSourceSearch

https://bikeindex.org/assets/controllers/homepage/recovery_showcas…9b12bbe65f61cccea4c0cfd8d5c45e726f035836.js

js bikeindex.org collected 2026-09-24 08:54:00 UTC 1,002 bytes, 33 lines download raw bytes

1import { Controller } from '@hotwired/stimulus'
2
3// Connects to data-controller='homepage--recovery-showcase'
4export default class extends Controller {
5  static targets = ['bikePhoto', 'next', 'prev', 'slide']
6  static values = { currentIndex: { type: Number, default: 0 } }
7
8  connect () {
9    this.slidesCount = this.slideTargets.length
10  }
11
12  next () {
13    this.goToSlide((this.currentIndexValue + 1) % this.slidesCount)
14  }
15
16  prev () {
17    this.goToSlide((this.currentIndexValue - 1 + this.slidesCount) % this.slidesCount)
18  }
19
20  goToSlide (index) {
21    // Hide current slide
22    this.slideTargets[this.currentIndexValue].classList.add('tw:hidden')
23
24    // Update index (this will trigger currentIndexValueChanged if you add that callback)
25    this.currentIndexValue = index
26
27    // Show new slide
28    this.slideTargets[this.currentIndexValue].classList.remove('tw:hidden')
29
30    // Update bike photo
31    this.bikePhotoTarget.src = this.slideTargets[this.currentIndexValue].dataset.imageUrl
32  }
33};

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.