PageSourceSearch

https://www.mentza.com/assets/controllers/clipboard_controller-11328813.js

js mentza.com collected 2026-10-01 12:11:02 UTC 786 bytes, 25 lines download raw bytes

1// app/typescript/controllers/clipboard_controller.ts
2import { Controller } from "@hotwired/stimulus";
3
4class clipboard_controller_default extends Controller {
5  connect() {}
6  copy() {
7    const value = this.element.dataset.value;
8    var tempInput = document.createElement("input");
9    tempInput.style = "position: absolute; left: -1000px; top: -1000px";
10    tempInput.value = value ?? "";
11    document.body.appendChild(tempInput);
12    tempInput.select();
13    document.execCommand("copy");
14    document.body.removeChild(tempInput);
15    const oldValue = this.element.innerHTML;
16    this.element.innerHTML = "Copied!";
17    const self = this;
18    setTimeout(function() {
19      self.element.innerHTML = oldValue;
20    }, 1000);
21  }
22}
23export {
24  clipboard_controller_default as default
25};

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.