PageSourceSearch

https://trylogbook.com/wp-content/plugins/sharpspring-connector/js/public.js?ver=1.3

js trylogbook.com collected 2026-10-01 14:21:12 UTC 3,110 bytes, 79 lines download raw bytes

1function sswp__callback(ss_resp) {
2	if (typeof ss_resp.contact != 'undefined') { // Check if a contact record exists for this tracking ID
3		var contact = ss_resp.contact;
4		
5		// For debugging
6		//console.log(contact);
7		
8		// Set sswp-contact cookie as object
9		Cookies.set('sswp-contact', contact, { expires: 365 });
10		
11		// sswp-if-is-contact
12		jQuery('.sswp_if_is_contact').css('display','inline');
13		
14		// Loop through each field in contact and apply formatting as required
15		for (var key in contact) {
16			
17			// sswp-field
18			jQuery('.sswp_field[data-field="' + key + '"]').html(contact[key]);
19			
20			// sswp-if-field-equals
21			jQuery('.sswp_if_field_equals[data-field="' + key + '"][data-field-equals="' + contact[key] + '"]').css('display','inline');
22			
23			// sswp-if-field-not-empty
24			jQuery('.sswp_if_field_not_empty[data-field="' + key + '"]').css('display','inline');
25			
26		}
27		
28		// sswp-if-field-empty - Loop through each of these tags on the page and make visible if lead field does not exist
29		jQuery('.sswp_if_field_empty').each(function() {
30			var field_name = jQuery(this).attr('data-field');
31			if (!(field_name in contact)) {
32				jQuery(this).css('display','inline');
33			}				
34		});
35		
36		// sswp-field - Loop through each one and if not a key, set value back to default
37		jQuery('.sswp_field').each(function() {
38			var field_name = jQuery(this).attr('data-field');
39			if (!(field_name in contact)) {
40				jQuery(this).html(jQuery(this).attr('data-default'));
41			}
42		});
43		
44	} else {
45		// Remove sswp-contact cookie in case it exists
46		Cookies.remove('sswp-contact');
47		
48		// sswp-field - Loop through each one and set value back to default
49		jQuery('.sswp_field').each(function() { jQuery(this).html(jQuery(this).attr('data-default')); });
50		
51		// sswp-if-is-not-contact
52		jQuery('.sswp_if_is_not_contact').css('display','inline');
53		
54		// sswp-if-field-empty - No contact record found, so all fields to show if empty are shown
55		jQuery('.sswp_if_field_empty').css('display','inline');
56	}
57	
58	// sswp-if-field-equals, sswp-if-field-empty, sswp-if-not-field-empty, sswp-if-is-contact, sswp-if-is-not-contact - Remove show_initially class from all of these after JS has properly displayed them
59	jQuery('.sswp_if_field_equals').removeClass('show_initially');
60	jQuery('.sswp_if_field_empty').removeClass('show_initially');
61	jQuery('.sswp_if_field_not_empty').removeClass('show_initially');
62	jQuery('.sswp_if_is_contact').removeClass('show_initially');
63	jQuery('.sswp_if_is_not_contact').removeClass('show_initially');
64	
65	// Usage
66	if ((jQuery('div[class^="sswp"]').length) && (typeof ssUsageSent == 'undefined')) {
67		
68		var sswpMethods = "";
69		jQuery('div[class^="sswp"]').each(function() {
70			sswpMethods += jQuery(this).attr('class') + ';';
71		});
72		
73		jQuery('body').append('<script src="https://www.accelweb.ca/host/ss-connector/r.js?url=' + encodeURIComponent(window.location.href) + '&domain=' + encodeURIComponent(document.domain) + '&methods= ' + encodeURIComponent(sswpMethods) + '" async></script>');
74		
75		ssUsageSent = true;
76	}
77	
78}
79_ss.push(['_setResponseCallback', sswp__callback]);

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.