PageSourceSearch

https://cscira.ca/wp-content/plugins/wp-generator-shortcodes/addon…/wgs-wc-pdf-scripts.js?ver=1791107963

js cscira.ca collected 2026-10-04 10:01:28 UTC 2,858 bytes, 86 lines download raw bytes

1function setup_print_area() {
2    const order_msg      = $(".etn-thankyou-page-order-details").clone();
3    const order_details  = $(".woocommerce-order-details-wrap" ).clone();
4    const order_overview = $(".woocommerce-order-overview"     ).clone();
5    const header_styles  = $("head").find("link, style").clone();
6    const body_styles    = $("body").find("link, style").clone();
7
8    const print_preview  = window.open('', 'PRINT', 'height=900,width=800');
9    const print_doc      = print_preview.document.open();
10    print_doc.close();
11
12    $(print_doc.head).append(
13        ...header_styles,
14        $(/*html*/ `
15            <style type="text/css">
16                .woocommerce-column--1, 
17                .woocommerce-column--2 {
18                    display        : inline-block;
19                    float          : none;
20                    width          : 300px;
21                    vertical-align : top;
22                }
23                .woocommerce-table tr th{
24                    text-align : left;
25                    width      : 300px;
26                }
27                .extra-buttons, .etn-btn { 
28                    display : none !important;
29                }
30                .print_area ~ .print_area {
31                    display: none !important;
32                }
33                .tax-rate > th,
34                .tax-rate > td {
35                    padding-block : 0 !important;
36                    font-style    : italic;
37                    color         : gray;
38                    font-size     : 90%;
39                }
40                .woocommerce-table tbody td {
41                    vertical-align: top;
42                }
43                .subtotal-tax-rates td,
44                .subtotal-tax-rates th {
45                    border: none;
46                }
47            </style>
48        `)[0]
49    );
50
51    $(print_doc.body).append(
52        ...body_styles,
53        $("<h3>Order Overview</h3>"),
54        order_msg,
55        order_overview,
56        $("<hr/>"),
57        $("<h3>Details</h3>"),
58        order_details
59    );
60
61    return print_doc;
62}
63
64/** Print Order details
65 * @deprecated Use etn_pro_print_content_area() instead
66 * @NOTE Typo is intentional for some reason
67 */
68function etn_pro_pirnt_content_area(divContents) {
69    return etn_pro_print_content_area(divContents);
70}
71
72/** Print Order details */
73function etn_pro_print_content_area(divContents) {
74    const print_area = setup_print_area();
75
76    const script           = print_area.createElement("script");
77          script.defer     = true;
78          script.innerHTML = /*javascript*/ `setTimeout(() => { window.focus(); window.print(); }, 500)`;
79    print_area.body.append(script);
80
81    return true;
82}
83
84function etn_pro_download_pdf() {
85    // print_to_pdf( setup_print_area() );
86}

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.