PageSourceSearch

https://tutzing.de/wp-content/plugins/jet-engine/includes/modules/…/js/public/user-geolocation.js?ver=3.8.1.1

js tutzing.de collected 2026-09-24 21:17:45 UTC 1,448 bytes, 58 lines download raw bytes

1( function( $ ) {
2
3	"use strict";
4
5	const initGeolocationFilter = function() {
6
7		window.JetSmartFilters.filtersList.JetEngineUserGeolocation = 'jet-smart-filters-user-geolocation';
8		window.JetSmartFilters.filters.JetEngineUserGeolocation = class JetEngineUserGeolocation extends window.JetSmartFilters.filters.Search {
9
10			name = 'user-geolocation';
11
12			constructor( $container ) {
13				
14				const $filter = $container.find( '.geolocation-data' );
15				
16				super( $container, $filter );
17
18				if ( navigator.geolocation ) {
19					
20					navigator.geolocation.getCurrentPosition( ( position ) => {
21						
22						this.dataValue = {
23							latitude: position.coords.latitude,
24							longitude: position.coords.longitude,
25						}
26
27						// To prevent adds to Active Filters.
28						window.JetSmartFilters?.filterGroups?.[ this.provider + '/' + this.queryId ]?.activeItemsExceptions.push( this.name );
29
30						this.emitFitersApply();
31
32					} );
33				}
34
35			}
36
37			processData() {
38			}
39
40			reset() {
41				// Left empty to prevent reset when clicking the Remove filters button
42			}
43
44		};
45
46	}
47
48	if ( window.JetMapListingGeolocationFilterData && 'jet-smart-filters/before-init' === window.JetMapListingGeolocationFilterData.initEvent ) {
49		document.addEventListener( 'jet-smart-filters/before-init', ( e ) => {
50			initGeolocationFilter();
51		});
52	} else {
53		window.addEventListener( 'DOMContentLoaded', ( e ) => {
54			initGeolocationFilter();
55		});
56	}
57
58}( 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.