1import { Controller } from "@hotwired/stimulus" 2 3// Connects to data-controller="copyable" 4export default class extends Controller { 5 static values = { 6 data: String, 7 success: Boolean, 8 } 9 10 copy(event) { 11 navigator.clipboard.writeText(this.dataValue).then( 12 () => { 13 this.successValue = true 14 setTimeout(() => { 15 this.successValue = false 16 }, 1000) 17 }, 18 () => { 19 console.log("failed") 20 } 21 ) 22 event.preventDefault() 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.