1import { Controller } from "@hotwired/stimulus" 2 3export default class extends Controller { 4 static values = { url: String } 5 6 connect() { 7 this.handleKeydown = this.handleKeydown.bind(this) 8 document.addEventListener("keydown", this.handleKeydown) 9 } 10 11 disconnect() { 12 document.removeEventListener("keydown", this.handleKeydown) 13 } 14 15 handleKeydown(event) { 16 if (event.metaKey && event.shiftKey && event.key === "p") { 17 event.preventDefault() 18 window.location.href = this.urlValue 19 } 20 } 21}
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.