PageSourceSearch

https://railsblocks.com/assets/controllers/read_more_controller-85…97a423b274daf4c2f6db4496b16253e2f01492d9.js

js railsblocks.com collected 2026-09-25 20:23:59 UTC 517 bytes, 22 lines download raw bytes

1import { Controller } from "@hotwired/stimulus";
2
3export default class extends Controller {
4  static targets = ["description", "text"];
5
6  connect() {
7    this.updateButtonText();
8  }
9
10  toggle() {
11    this.descriptionTarget.classList.toggle("line-clamp-3");
12    this.updateButtonText();
13  }
14
15  updateButtonText() {
16    if (this.descriptionTarget.classList.contains("line-clamp-3")) {
17      this.textTarget.textContent = "Read More ↓";
18    } else {
19      this.textTarget.textContent = "Read Less ↑";
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.