PageSourceSearch

https://latex2web.app/assets/controllers/code_controller-Mz4nMZd.js

js latex2web.app collected 2026-10-04 14:34:03 UTC 828 bytes, 28 lines download raw bytes

1import {Controller} from '@hotwired/stimulus';
2
3export default class extends Controller {
4    static values = {
5        id: String
6    }
7
8    copy(event) {
9        event.stopPropagation();
10        let id = this.idValue;
11        let element = document.getElementById(id);
12        if (element) {
13            let text = element.innerText;
14            navigator.clipboard.writeText(text)
15                .then(function () {
16                    new Notify({
17                        status: 'success',
18                        title: 'Code copied',
19                        customIcon: '<i class="fa-solid fa-copy"></i>',
20                        text: '<pre>'+text+'</pre>',
21                    })
22                })
23                .catch(function (error) {
24                    console.log(error);
25                })
26        }
27    }
28}

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.