PageSourceSearch

https://littlebirdelectronics.com.au/assets/controllers/ecommerce/star_rating_controller-7c73908d.js

js littlebirdelectronics.com.au collected 2026-09-25 14:11:25 UTC 620 bytes, 21 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3export default class extends Controller {
4  static targets = ["input", "star"]
5
6  update() {
7    const checked = this.inputTargets.find(input => input.checked)
8    if (!checked) return
9
10    const rating = parseInt(checked.value)
11    this.starTargets.forEach((star, index) => {
12      if (index < rating) {
13        star.classList.remove("text-gray-200", "dark:text-gray-700")
14        star.classList.add("text-yellow-400")
15      } else {
16        star.classList.add("text-gray-200", "dark:text-gray-700")
17        star.classList.remove("text-yellow-400")
18      }
19    })
20  }
21}

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.