PageSourceSearch

https://www.stocanada.com/wp-content/themes/total-child-theme-master/js/system-info.js

js stocanada.com collected 2026-10-04 01:36:50 UTC 2,397 bytes, 51 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2    document.body.addEventListener('click', function (event) {
3        if (event.target && event.target.matches('.post-link')) {
4            event.preventDefault();
5
6            const postId = event.target.getAttribute('data-post-id');
7
8            const resultDiv = document.getElementById('system-info');
9            resultDiv.innerHTML = '<div class="loader">Loading...</div>';
10
11            fetch(ajaxData.ajaxUrl, {
12                method: 'POST',
13                headers: {
14                    'Content-Type': 'application/x-www-form-urlencoded',
15                },
16                body: `action=get_post_details&post_id=${postId}`,
17            })
18            .then((response) => response.json())
19            .then((data) => {
20                if (data.success) {
21                    resultDiv.innerHTML = `<h2>${data.data.title}</h2>`;
22
23                    resultDiv.innerHTML += `<div class="post-thumbnail"><img src="${data.data.image ? data.data.image : data.data.thumbnail}" alt="${data.data.image ? 'System Thumbnail' : 'Thumbnail'}" ${data.data.image ? 'width="250"' : ''}></div>`
24
25                    resultDiv.innerHTML +=
26                    `<div class="post-excerpt">${data.data.description}</div>`
27
28                    if (data.data.bulletin.search('<li>') !== -1) {
29                        resultDiv.innerHTML += `<div class="custom-meta"><strong>Bulletin:</strong> ${data.data.bulletin}</div>`;
30                    }
31
32                    if (data.data.specifications.search('<li>') !== -1) {
33                        resultDiv.innerHTML += `<div class="custom-meta"><strong>Specifications:</strong> ${data.data.specifications}</div>`;
34                    }
35
36                    if (data.data.reports.search('<li>') !== -1) {
37                        resultDiv.innerHTML += `<div class="custom-meta"><strong>Reports:</strong> ${data.data.reports}</div>`;
38                    }
39
40                    resultDiv.innerHTML += `<div class="moreinfo-system"><a href="${data.data.url}" target="_blank">System Info</a></div>`;
41                } else {
42                    console.log(`Error: ${data.data.message}`);
43                }
44            })
45            .catch((error) => {
46                console.error('Error:', error);
47                alert('An error occurred. Please try again.');
48            });
49        }
50    });
51});

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.