PageSourceSearch

https://oil-testing.com/wp-content/themes/genesis-oiltesting/js/genesis-sample.js?ver=457

js oil-testing.com collected 2026-10-02 15:46:41 UTC 9,734 bytes, 292 lines download raw bytes

1/**
2 * Genesis Sample entry point.
3 *
4 * @package GenesisSample\JS
5 * @author  StudioPress
6 * @license GPL-2.0+
7 */
8
9var genesisSample = ( function( $ ) {
10	'use strict';
11
12	/**
13	 * Adjust site inner margin top to compensate for sticky header height.
14	 *
15	 * @since 2.6.0
16	 */
17	var moveContentBelowFixedHeader = function() {
18		var siteInnerMarginTop = 0;
19
20		if( $('.site-header').css('position') === 'fixed' ) {
21			siteInnerMarginTop = $('.site-header').outerHeight();
22		}
23
24		$('.site-inner').css('margin-top', siteInnerMarginTop);
25	},
26
27	/**
28	 * Initialize Genesis Sample.
29	 *
30	 * Internal functions to execute on document load can be called here.
31	 *
32	 * @since 2.6.0
33	 */
34	init = function() {
35		// Run on first load.
36		moveContentBelowFixedHeader();
37
38		// Run after window resize.
39		$( window ).resize(function() {
40			moveContentBelowFixedHeader();
41		});
42
43		// Run after the Customizer updates.
44		// 1.5s delay is to allow logo area reflow.
45		if (typeof wp.customize != "undefined") {
46			wp.customize.bind( 'change', function ( setting ) {
47				setTimeout(function() {
48					moveContentBelowFixedHeader();
49				  }, 1500);
50			});
51		}
52	};
53
54	// Expose the init function only.
55	return {
56		init: init
57	};
58
59})( jQuery );
60
61
62
63(function($){
64
65	$( window ).on( 'load', genesisSample.init );
66
67	$(document).on('click', '#our_solutions .uabb-blog-posts-shadow', function(){
68		$(this).find('a')[0].click();
69	});
70
71	$('#testimonials_home .uabb-module-content').slick({
72	  dots: true,
73	  infinite: true,
74	  speed: 300,
75	  slidesToShow: 3,
76	  slidesToScroll: 3,
77	  responsive: [
78	    {
79	      breakpoint: 1024,
80	      settings: {
81	        slidesToShow: 2,
82	        slidesToScroll: 2,
83	        infinite: true,
84	        dots: true
85	      }
86	    },
87	    {
88	      breakpoint: 600,
89	      settings: {
90	        slidesToShow: 1,
91	        slidesToScroll: 1
92	      }
93	    }
94	    // You can unslick at a given breakpoint now by adding:
95	    // settings: "unslick"
96	    // instead of a settings object
97	  ]
98	});
99
100
101	$(document).on('click', '#testimonials_home .uabb-module-content a', function(e){
102		e.preventDefault();
103	});
104
105	var ctr = 0;
106	var location;
107	var tel_label;
108	var tel_link;
109	var tel_number;
110	var map_link;
111	var map_label;
112	var location_text;
113
114	$('.map-details-tag').each(function(){
115		if(ctr == 0) {
116			location = $(this).data('location');
117			tel_label = $(this).data('tel-label');
118			tel_link = $(this).data('tel-link');
119			tel_number = $(this).data('tel-number');
120			map_link = $(this).data('map-link');
121			map_label = $(this).data('map-label');
122
123			location_text = '<div id="map_location_text">'+location+' '+tel_label+' <a href="tel:'+tel_link+'">'+tel_number+'</a> or <a href="'+map_link+'" target="_blank">'+map_label+'</a></div>';
124		}
125		ctr++;	
126	});
127
128	$('#footer_map .fl-photo').prepend(location_text);
129
130	var marker_content = [];
131	var ctr1 = 0;
132	$('.map-details-tag').each(function(){
133		if(ctr1 == 0) {
134			var marker_class = " active";
135		}
136		else {
137			var marker_class = "";
138		}
139		var location = $(this).data('location');
140		var tel_label = $(this).data('tel-label');
141		var tel_link = $(this).data('tel-link');
142		var tel_number = $(this).data('tel-number');
143		var map_link = $(this).data('map-link');
144		var map_label = $(this).data('map-label');
145		var y_axis = $(this).data('y-axis');
146		var x_axis = $(this).data('x-axis');
147
148		var style = "";
149
150		if(y_axis && x_axis) {
151			style = 'style="top: '+y_axis+'px; left: '+x_axis+'px;"';
152		}
153		
154		marker_content.push(location+' '+tel_label+' <a href="tel:'+tel_link+'">'+tel_number+'</a> or <a href="'+map_link+'" target="_blank">'+map_label+'</a>', );
155	
156		$('#footer_map .fl-photo-content').append('<div class="map-marker'+marker_class+'" data-id="'+ctr1+'" '+style+'></div>');
157
158		ctr1++;
159	});
160
161	console.log(marker_content);
162
163	// for(var i = 0; i<=13; i++) {
164	// 	if(i == 0) {
165	// 		var marker_class = " active";
166	// 	}
167	// 	else {
168	// 		var marker_class = "";
169	// 	}
170	// 	$('#footer_map .fl-photo-content').append('<div class="map-marker'+marker_class+'" data-id="'+i+'"></div>');
171	// }
172
173	$(document).on('mouseover', '#footer_map .map-marker', function(){
174		$('.map-marker').removeClass('active');
175		$(this).addClass('active');
176		var id = $(this).data('id');
177		$('#map_location_text').html(marker_content[id]);
178	});
179
180	$('.software-tab1').html('<img class="inactive" src="/wp-content/themes/genesis-oiltesting/images/icons/test-tubes.svg" /><img class="active" src="/wp-content/themes/genesis-oiltesting/images/icons/active/test-tubes-active.svg" />');
181
182	$('.software-tab2').html('<img class="inactive" src="/wp-content/themes/genesis-oiltesting/images/icons/monitor-dark.svg" /><img class="active" src="/wp-content/themes/genesis-oiltesting/images/icons/active/monitor-dark-active.svg" />');
183
184	$('.software-tab3').html('<img class="inactive" src="/wp-content/themes/genesis-oiltesting/images/icons/filter.svg" /><img class="active" src="/wp-content/themes/genesis-oiltesting/images/icons/active/filter-active.svg" />');
185
186	$('.software-tab4').html('<img class="inactive" src="/wp-content/themes/genesis-oiltesting/images/icons/tools-dark.svg" /><img class="active" src="/wp-content/themes/genesis-oiltesting/images/icons/active/tools-dark-active.svg" />');
187
188	$('.software-tab5').html('<img class="inactive" src="/wp-content/themes/genesis-oiltesting/images/icons/headphones-dark.svg" /><img class="active" src="/wp-content/themes/genesis-oiltesting/images/icons/active/headphones-dark-active.svg" />');
189
190	var mobile_menu = '<div class="mobile-menu-top"><ul id="menu-before-header" class="menu fl-menu-horizontal fl-toggle-none"><li id="menu-item-14" class="menu-item menu-item-type-custom menu-item-object-custom"><a href="#">LOAMS Login</a></li>'
191		+ '<li id="menu-item-15" class="menu-item menu-item-type-custom menu-item-object-custom"><a href="#">Worldwide</a></li>'
192		+ '<li id="menu-item-16" class="menu-item menu-item-type-custom menu-item-object-custom"><a href="/store">Store</a></li>'
193		+ '<li id="menu-item-17" class="menu-item menu-item-type-custom menu-item-object-custom"><a href="/cart">Cart</a></li>'
194		+ '</ul></div>';
195
196	$(window).resize(function(){
197		var screen = $(window).width();
198		$('.mobile-menu-top').remove();
199		if(screen <= 1024) {
200			$('header.fl-builder-content').prepend(mobile_menu);	
201		}	
202		// if($('.fl-node-5c120c0118581').length) {			
203		// 	$('.fl-node-5c120c0118581 .fl-col .fl-col-content').each(function(){
204		// 		var width = $(this).width();
205		// 		$(this).css('min-height', width);
206		// 	});
207		// }
208		// if($('.fl-node-5c120f36049e1').length) {	
209		// 	$('.fl-node-5c120f36049e1 .fl-col .fl-col-content').each(function(){
210		// 		var width = $(this).width();
211		// 		$(this).css('min-height', width);
212		// 	});
213		// }
214	}).trigger('resize');
215
216	$(document).on('click', '.fl-node-5c120c0118581 .fl-col .fl-col-content', function(){
217		$(this).find('.home-services-link a')[0].click();
218	});
219
220	$(document).on('click', '.services-left-button.mail-icon', function(e){
221		e.preventDefault();
222		$('.form-popup-general a').trigger('click');
223	});
224
225	$(document).on('click', '.services-left-button.phone-icon', function(e){
226		e.preventDefault();
227		var phone = $(this).find('a').text();
228		var phoneNum = 'tel:'+phone.trim();
229		$('#phone_yellow_anchor').attr('href', phoneNum);
230		setTimeout(function(){
231			$('#phone_yellow_anchor')[0].click();
232		}, 20);
233	});
234
235	$(document).on('click', '.services-left-button.location-icon a', function(e){
236		e.preventDefault();
237		$('#menu-item-22 a')[0].click();
238	});
239
240	$(document).on('click', '#industries_section .uabb-blog-posts-shadow', function(){
241		$(this).find('a')[0].click();
242	});
243
244	$(document).on('click', '.fl-node-5c120f36049e1 .fl-col .fl-col-content', function(){
245		$(this).find('.home-services-link a')[0].click();
246	});
247
248	$(document).on('click', '.fl-menu .fl-menu-toggle', function(){
249		if($(this).hasClass('down')) {
250			$(this).removeClass('down');
251		}
252		else {
253			$(this).addClass('down');
254		}
255	});
256
257	// $('#menu-header-menu > li.mega-menu .sub-menu').wrap( "<div class='sub-menu-wrap'></div>" );
258
259	// $(document).on('mouseover', '.fl-node-5c3c092405e39 .fl-tabs-label', function(){
260	// 	$(this)[0].click();
261	// });
262
263	$('.breadcrumbs a.post.post-product-archive span').html('Store').attr('href', '/store');
264	$('.breadcrumbs a.post.post-product-archive').attr('href', '/store');
265
266	$('.featured-blog-post .fl-post-feed-post').each(function(){
267		var string = $(this).find('.fl-post-feed-content > p').text(); // just an example
268		string = string.replace(' [', ''); 
269		string = string.replace(']', ''); 
270		$(this).find('.fl-post-feed-content > p').text(string);
271	});
272
273	$('.latest-blog-post .fl-post-feed-post').each(function(){
274		var string = $(this).find('.fl-post-feed-content > p').text(); // just an example
275		string = string.replace(' [', ''); 
276		string = string.replace(']', ''); 
277		$(this).find('.fl-post-feed-content > p').text(string);
278	});
279
280	$('.adjacent-entry-pagination').wrap('<div class="adjacent-entry-pagination-wrapper"></div>');
281	setTimeout(function(){$('.adjacent-entry-pagination-wrapper').prepend('<div class="adjacent-left-offset"></div>');}, 200);
282	
283	$('.adjacent-entry-pagination .pagination-previous.alignleft .adjacent-post-link').text('Previous article');
284	$('.adjacent-entry-pagination .pagination-next.alignright .adjacent-post-link').text('Next article');
285
286	$('.adjacent-entry-pagination').show();
287
288	document.addEventListener( 'wpcf7mailsent', function( event ) {
289	    location = '/thank-you';
290	}, false );
291
292})(jQuery) 

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.