PageSourceSearch

https://intern.aquaventus.org/wp-content/plugins/pdf-poster/admin/js/pdf_button.js?ver=1790367898

js aquaventus.org collected 2026-09-25 20:26:28 UTC 1,055 bytes, 34 lines download raw bytes

1jQuery(function ($) {
2    $(document).ready(function () {
3        // $('.pdfp_insert_pdf_btn').click(open_media_window);
4        setTimeout(() => {
5            document.querySelectorAll('.pdfp_insert_pdf_btn').forEach(btn => {
6                btn.addEventListener('click', open_media_window);
7            }) // end fo
8        }, 1000);
9
10    });
11
12
13    function open_media_window() {
14        if (this.window === undefined) {
15            this.window = wp.media({
16                title: 'Choose PDF File',
17                library: { type: 'application/pdf' },
18                multiple: false,
19                button: { text: 'Embed This File' }
20            });
21
22            var self = this; // Needed to retrieve our variable in the anonymous function below
23            this.window.on('select', function () {
24                var first = self.window.state().get('selection').first().toJSON();
25                wp.media.editor.insert('[pdf_embed url="' + first.url + '"]');
26            });
27        }
28
29        this.window.open();
30        return false;
31    }
32
33
34});

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.