PageSourceSearch

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

js softfurnishers.com collected 2026-10-04 06:01:08 UTC 3,025 bytes, 109 lines download raw bytes

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

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.