PageSourceSearch

https://jurizdat.ru/assets/js/editorjs/plugin/subscription/index-dIj3euL.js

js jurizdat.ru collected 2026-09-26 05:56:37 UTC 1,028 bytes, 37 lines download raw bytes

1export default class Subscription {
2    static get toolbox() {
3        return {
4            'title': 'Подписка',
5        }
6    }
7
8    constructor({ block, data }) {
9        this.block = block;
10        this.data = data;
11    }
12
13    render() {
14        const plugins = document.getElementById('editor_plugins');
15        const pluginTemplate = plugins.querySelector('#subscription');
16        const plugin = pluginTemplate.content.querySelector('.plugin-container');
17        const insertPlugin = plugin.cloneNode(true);
18        insertPlugin.id = `subscription_${this.block.id}`;
19
20        insertPlugin.querySelectorAll('.block-field').forEach((field) => {
21            const savedFieldValue = this.data[field.name] ?? null;
22            field.value = savedFieldValue;
23        });
24
25        return insertPlugin
26    }
27
28    save(blockContent) {
29        const data = {};
30
31        blockContent.querySelectorAll('.block-field').forEach((field) => {
32            data[field.name] = field.value;
33        });
34
35        return data;
36    }
37};

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.