PageSourceSearch

https://freshjots.com/assets/controllers/select_all_controller-5cde5fb9.js

js freshjots.com collected 2026-10-04 22:57:00 UTC 751 bytes, 19 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// Selects all text in the attached field on click/focus.
4//
5// Replaces inline onclick="this.select()", which the app's strict CSP
6// (script-src 'self', no unsafe-inline/unsafe-hashes — see
7// config/initializers/content_security_policy.rb) blocks: a CSP nonce
8// does not authorise inline on* attributes. Used by the team-note
9// public-share URL field (app/views/teams/notes/show.html.erb) so
10// clicking the field still selects the whole URL for easy copying.
11//
12// Attach to the field itself:
13//   data: { controller: "select-all",
14//           action: "click->select-all#select focus->select-all#select" }
15export default class extends Controller {
16  select() {
17    this.element.select()
18  }
19}

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.