PageSourceSearch

https://chat.aiacademy.me/assets/stimulus/clipboard_controller-1ec…a7c67f6ace5ac6a8ed032ae414dae36e1e27ae38.js

js aiacademy.me collected 2026-10-03 23:56:44 UTC 573 bytes, 24 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3export default class extends Controller {
4  static targets = [ "text" ]
5
6  initialize() {
7    window.clipboardForSystemTestsToCheck = ""
8  }
9
10  copy() {
11    navigator.clipboard.writeText(this.text)
12    window.clipboardForSystemTestsToCheck = this.text
13  }
14
15  get text() {
16    return this.removeExclusions(this.textTarget).innerText?.trim()
17  }
18
19  removeExclusions(node) {
20    let clonedNode = node.cloneNode(true)
21    clonedNode.querySelectorAll('.clipboard-exclude').forEach(el => el.remove())
22    return clonedNode
23  }
24};

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.