PageSourceSearch

https://survivalbrasil.org/assets/controllers/utils/clipboard_controller-6c3e0bae.js

js survivalbrasil.org collected 2026-09-25 18:53:47 UTC 539 bytes, 20 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// Connects to data-controller="utils--clipboard"
4export default class extends Controller {
5  static targets = ['source']
6
7  connect () {
8    if (!navigator['clipboard']) {
9      this.element.style.display = 'none';
10    }
11  }
12
13  copy () {
14    navigator.clipboard.writeText(this.sourceTarget.dataset.text)
15    this.sourceTarget.innerHTML = '<i class="bi bi-clipboard-check"></i>'
16    setTimeout(() => {
17      this.sourceTarget.innerHTML = '<i class="bi bi-clipboard">';
18    }, '1000')
19  }
20}

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.