PageSourceSearch

https://www.price2spy.com/wp-content/themes/strata-child/js/strata_child.js?ver=1.0.14

js price2spy.com collected 2026-10-02 04:13:29 UTC 2,891 bytes, 71 lines download raw bytes

1var $j = jQuery.noConflict();
2
3$j(document).ready( function() {
4
5    // UTM PARAMETERS IN LINKS
6    if ( document.cookie.includes('utm_params=') ) {
7        
8        const utmCookie = decodeURIComponent(document.cookie.match(/utm_params=([^;]*)(?=;|$)/m)[1]);
9        const utmParams = new URLSearchParams(JSON.parse(utmCookie));
10        
11        $j('a[href*="spy.price2spy.com"]').on('click', function(e) {
12            var linkHash = this.hash;
13            var link = linkHash ? this.href.split('#')[0] : this.href;
14
15            if (link.includes('?')) {
16                link = link.split('?')[0] + '?' +
17                    utmParams + '&' +
18                    link.split('?')[1];
19            } else {
20                link += '?' + utmParams;
21            }
22            link += (linkHash ? linkHash : '');
23            this.href = link;
24        })
25	}
26    
27	window.dataLayer = window.dataLayer || [];
28	$j('a[href*="spy.price2spy.com/registration"], .p2s-plan-comparison a[href*="contact-us"], .p2s-cta-section a[href*="contact-us"]').on('click', function(e) {
29		var eventData = {};
30        if ($j(this).closest('.p2s-plan-comparison').length) {
31            eventData = {
32                'event': 'pricingCardsClick',
33                'eventName': 'User clicked on a pricing card register button',
34                'planType': $j(this).data('type')
35            };
36        } else {
37            var location = 'body';
38            if ($j(this).closest('.page_header').length) {
39            	location = 'header';
40            } else if ($j(this).closest('.footer_inner').length) {
41            	location = 'footer';
42            } else if ($j(this).closest('#homeBanner').length) {
43            	location = 'banner';
44            } else if ($j(this).closest('.p2s-cta-section').length) {
45                location = 'cta shortcode';
46            }
47        	eventData = {
48                'event': 'registerLinkClick',
49                'eventName': 'User clicked on a register link',
50                'location': location,
51                'CTAText': $j(this).text()
52            }
53        }
54		window.dataLayer.push(eventData);
55	});
56    
57    $j('.p2s-code-box .p2s-code-box-title button').on('click', function(event) {
58        const button = $j(event.target);
59        if (!button.hasClass('copied')) {
60            const codeText = $j(this).closest('.p2s-code-box').find('code').html().replaceAll('<br>', '\n');
61            navigator.clipboard.writeText(codeText).then(function () {
62                button.html(`<i class="fa fa-check" aria-hidden="true"></i>Code copied!`).addClass('copied');
63                setTimeout(function () {
64                    button.html(`<i class="fa fa-clipboard" aria-hidden="true"></i>Copy to clipboard`).removeClass('copied');
65                }, 1000);
66            }).catch(function (err) {
67                console.error('Copy failed', err);
68            });
69        }
70    });
71});

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.