PageSourceSearch

https://meimingle.github.io/js/lib/preview.js

js meimingle.github.io collected 2026-10-03 09:35:50 UTC 815 bytes, 27 lines download raw bytes

1mixins.preview = {
2    data() {
3        return { previewShow: false };
4    },
5    created() {
6        this.renderers.push(this.preview);
7    },
8    methods: {
9        preview() {
10            let preview = this.$refs.preview,
11                content = this.$refs.previewContent;
12            let images = document.querySelectorAll("img");
13            for (let i of images)
14                i.addEventListener("click", () => {
15                    content.alt = i.alt;
16                    content.src = i.src;
17                    this.previewShow = true;
18                });
19            preview.addEventListener("click", () => {
20                this.previewShow = false;
21            });
22            window.addEventListener("resize", () => {
23                this.previewShow = false;
24            });
25        },
26    },
27};

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.