PageSourceSearch

https://www.snydersofhanover.com/wp-content/plugins/print-o-matic/js/printomat.js?ver=2.0.10

js snydersofhanover.com collected 2026-10-03 19:13:37 UTC 3,133 bytes, 110 lines download raw bytes

1/*!
2 * Print-O-Matic JavaScript v2.0.10
3 * https://pluginoven.com/plugins/print-o-matic/
4*/
5
6jQuery(document).ready(function() {
7	jQuery(document).on( 'click', '.printomatic, .printomatictext', function(e) {
8		e.preventDefault();
9		var id = jQuery(this).attr('id');
10		var this_print_data;
11		if(eval('typeof print_data_' + id) !== "undefined"){
12			this_print_data = eval('print_data_' + id );
13		}
14
15		if(this_print_data && 'pom_do_not_print' in this_print_data && jQuery(this_print_data.pom_do_not_print).length){
16			jQuery(this_print_data.pom_do_not_print).addClass('pe-no-print');
17		}
18		else if (jQuery(print_data.pom_do_not_print).length){
19			jQuery(print_data.pom_do_not_print).addClass('pe-no-print');
20		}
21
22		//add any html top or bottom
23		var has_top_html = false;
24		if(this_print_data && 'pom_html_top' in this_print_data){
25			jQuery( 'body' ).prepend( '<div id="pom_top_html" class="pe-preserve-ancestor">' + this_print_data.pom_html_top + '</div>' );
26			has_top_html = true;
27		}
28		else if (print_data.pom_html_top){
29			jQuery( 'body' ).prepend( '<div id="pom_top_html" class="pe-preserve-ancestor">' + print_data.pom_html_top + '</div>' );
30			has_top_html = true;
31		}
32
33		var has_bot_html = false;
34		if(this_print_data && 'pom_html_bottom' in this_print_data){
35			jQuery( 'body' ).append( '<div id="pom_bot_html" class="pe-preserve-ancestor">' + this_print_data.pom_html_bottom + '</div>' );
36			has_bot_html = true;
37		}
38		else if (print_data.pom_html_bottom){
39			jQuery( 'body' ).append( '<div id="pom_bot_html" class="pe-preserve-ancestor">' + print_data.pom_html_bottom + '</div>' );
40			has_bot_html = true;
41		}
42
43		var trigger = jQuery(this);
44		var target = trigger.data('print_target');
45	
46		if(!target){
47			classes = trigger.attr("class").split(/\s+/);
48			for(i=0; i<classes.length; i++){
49				if(classes[i].substring(0, 12) == "printtarget-"){
50					target = classes[i].substring(12, classes[i].length);
51				}
52			}
53		}
54
55		if(!target || !jQuery(target).length ){
56			return;
57		}
58
59		var target_arr = target.split(", ");
60		var targets = [];
61		var targ;
62		jQuery.each( target_arr, function( key, value ) {
63			if (value == '%prev%') {
64				targ = trigger.prev();
65			}
66			else if (value == '%next%') {
67				targ = trigger.next();
68			}
69			else{
70				targ = jQuery(value);
71			}
72			//only add target if found on page
73			if(targ.length){
74				jQuery.each( targ, function( ) {
75					targets.push(this);
76				});
77			}
78			
79		});
80
81		// remove loading attribute
82		jQuery('img').each( function () {
83			jQuery(this).removeAttr('loading');
84		});
85		
86		var pause_time = print_data.pom_pause_time;
87		if(this_print_data && 'pom_pause_time' in this_print_data){
88			pause_time = this_print_data.pom_pause_time;
89		}
90
91		//pause_time is now pause to allow the browser to render the print preview before resetting back to display
92		//force at least 2 seconds 
93		pause_time = pause_time + 2000;
94
95		if(targets){
96			PrintElements.print(targets, pause_time);
97		}
98		
99		setTimeout(function () {
100			if ( has_top_html ){
101					jQuery( '#pom_top_html' ).remove();
102			}
103			if ( has_bot_html ){
104					jQuery( '#pom_bot_html' ).remove();
105			}
106		}, pause_time);
107		
108
109	});
110});

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.