PageSourceSearch

https://andresbanquet.com/wp-content/themes/royal-event/js/theme.init.js

js andresbanquet.com collected 2026-10-09 22:41:39 UTC 8,286 bytes, 220 lines download raw bytes

1/* global jQuery:false */
2/* global ROYAL_EVENT_STORAGE:false */
3
4
5// Theme-specific first load actions
6//==============================================
7function royal_event_theme_ready_actions() {
8	"use strict";
9	// Put here your init code with theme-specific actions
10	// It will be called before core actions
11
12
13	jQuery('body').find('.variations select').each(function() {
14		var s = jQuery(this);
15		if (s.css('display') != 'none'
16			&& s.parents('.select_container').length == 0
17			&& !s.next().hasClass('select2')
18			&& !s.hasClass('select2-hidden-accessible'))
19			s.wrap('<div class="select_container"></div>');
20	});
21
22
23
24	// Checkbox with "I agree..."
25	if (jQuery('input[type="checkbox"][name="i_agree_privacy_policy"]:not(.inited),input[type="checkbox"][name="gdpr_terms"]:not(.inited),input[type="checkbox"][name="wpgdprc"]:not(.inited)').length > 0) {
26		jQuery('input[type="checkbox"][name="i_agree_privacy_policy"]:not(.inited),input[type="checkbox"][name="gdpr_terms"]:not(.inited),input[type="checkbox"][name="wpgdprc"]:not(.inited)')
27			.addClass('inited')
28			.on('change', function(e) {
29				if (jQuery(this).get(0).checked)
30					jQuery(this).parents('form').find('button,input[type="submit"]').removeAttr('disabled');
31				else
32					jQuery(this).parents('form').find('button,input[type="submit"]').attr('disabled', 'disabled');
33			}).trigger('change');
34	}
35
36}
37
38jQuery('.externa-link .sc_price_block_bottom_link').attr('target','_blank');
39
40// Theme-specific post-formats init
41//=====================================================
42function royal_event_theme_init_post_formats() {
43	"use strict";
44	// Put here your theme-specific code to init post-formats
45	// It will be called before core init post_formats when page is loaded or after 'Load more' or 'Infinite scroll' actions
46
47	// Tribe Events buttons decoration (add 'sc_button' class)
48	jQuery('a.tribe-events-read-more,.tribe-events-button,.tribe-events-nav-previous a,.tribe-events-nav-next a,.tribe-events-widget-link a,.tribe-events-viewmore a')
49		.addClass('sc_button sc_button_style_filled');
50
51	// All other buttons decoration (add 'hover' class)
52	if (ROYAL_EVENT_STORAGE['button_hover'] && ROYAL_EVENT_STORAGE['button_hover']!='default') {
53		jQuery('button:not(.search_submit):not([class*="sc_button_hover_"]),\
54				.sc_button:not(.sc_button_style_border):not([class*="sc_button_hover_"]),\
55				.woocommerce .button:not([class*="sc_button_hover_"]),.woocommerce-page .button:not([class*="sc_button_hover_"]),\
56				#buddypress a.button:not([class*="sc_button_hover_"]),\
57				.elementor-widget-button:not(.custom_button) .elementor-widget-container .elementor-button-wrapper a.elementor-button-link:not([class*="sc_button_hover_"])'
58				).addClass('sc_button_hover_'+ROYAL_EVENT_STORAGE['button_hover']);
59		if (ROYAL_EVENT_STORAGE['button_hover']!='arrow')
60			jQuery('input[type="submit"]:not([class*="sc_button_hover_"]),\
61					input[type="button"]:not([class*="sc_button_hover_"]),\
62					.isotope_filters_button,\
63					.scroll_to_top:not([class*="sc_button_hover_"]),\
64					.sc_slider_prev:not([class*="sc_button_hover_"]),.sc_slider_next:not([class*="sc_button_hover_"]),\
65					.tagcloud > a:not([class*="sc_button_hover_"])'
66					).addClass('sc_button_hover_'+ROYAL_EVENT_STORAGE['button_hover']);
67		jQuery('button:not(.search_submit):not([class*="sc_button_hover_"]),\
68					.widget_area .widget_tag_cloud a,\
69					.widget_area .widget_product_tag_cloud a,\
70					.elementor-button,\
71					.pswp__button,\
72					.widget.widget_search:not(.widget_block) .search_button'
73					).removeClass('sc_button_hover_'+ROYAL_EVENT_STORAGE['button_hover']);
74	}
75
76
77	// Mark field as 'filled' on keypress
78	jQuery('[class*="sc_input_hover_"] input, [class*="sc_input_hover_"] textarea').each(function() {
79		if (jQuery(this).val()!='')
80			jQuery(this).addClass('filled');
81		else
82			jQuery(this).removeClass('filled');
83	});
84	jQuery('[class*="sc_input_hover_"] input, [class*="sc_input_hover_"] textarea').on('blur', function() {
85		if (jQuery(this).val()!='')
86			jQuery(this).addClass('filled');
87		else
88			jQuery(this).removeClass('filled');
89	});
90}
91
92
93// Theme-specific GoogleMap styles
94//=====================================================
95function royal_event_theme_googlemap_styles($styles) {
96	"use strict";
97	// Put here your theme-specific code to add GoogleMap styles
98	// It will be called before GoogleMap init when page is loaded
99	$styles['greyscale'] = [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#333333"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#ffffff"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#fefefe"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#fefefe"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#efeeed"},{"lightness":20}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":21}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#f2f0f1"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#ffffff"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#ffffff"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#c2b698"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#b7b2a6"},{"lightness":17}]}];
100	$styles['inverse'] = [
101		{ "stylers": [
102			{ "invert_lightness": true },
103			{ "visibility": "on" }
104			]
105		}
106	];
107	$styles['simple'] = [
108    	{ stylers: [
109        	{ hue: "#00ffe6" },
110            { saturation: -20 }
111			]
112		},
113		{ featureType: "road",
114          elementType: "geometry",
115          stylers: [
116			{ lightness: 100 },
117           	{ visibility: "simplified" }
118            ]
119		},
120		{ featureType: "road",
121          elementType: "labels",
122          stylers: [
123          	{ visibility: "off" }
124            ]
125		}
126	];
127	$styles['apple'] = [
128		{ "featureType": "landscape.man_made",
129		  "elementType": "geometry",
130		  "stylers": [
131			{"color":"#f7f1df"}
132			]
133		},
134		{ "featureType": "landscape.natural",
135		  "elementType": "geometry",
136		  "stylers": [
137		  	{"color":"#d0e3b4"}
138			]
139		},
140		{ "featureType": "landscape.natural.terrain",
141		  "elementType": "geometry",
142		  "stylers": [
143		  	{"visibility":"off"}
144			]
145		},
146		{ "featureType": "poi",
147		  "elementType": "labels",
148		  "stylers": [
149		  	{"visibility":"off"}
150			]
151		},
152		{ "featureType": "poi.business",
153		  "elementType": "all",
154		  "stylers": [
155		  	{"visibility":"off"}
156			]
157		},
158		{ "featureType": "poi.medical",
159		  "elementType": "geometry",
160		  "stylers": [
161		  	{"color":"#fbd3da"}
162			]
163		},
164		{ "featureType": "poi.park",
165		  "elementType": "geometry",
166		  "stylers": [
167		  	{"color":"#bde6ab"}
168			]
169		},
170		{ "featureType": "road",
171		  "elementType": "geometry.stroke",
172		  "stylers": [
173		  	{"visibility":"off"}
174			]
175		},
176		{ "featureType": "road",
177		  "elementType": "labels",
178		  "stylers": [
179		  	{"visibility":"off"}
180			]
181		},
182		{ "featureType": "road.highway",
183		  "elementType": "geometry.fill",
184		  "stylers": [
185		  	{"color":"#ffe15f"}
186			]
187		},
188		{ "featureType": "road.highway",
189		  "elementType":"geometry.stroke",
190		  "stylers": [
191		  	{"color":"#efd151"}
192		  	]
193		},
194		{ "featureType": "road.arterial",
195		  "elementType": "geometry.fill",
196		  "stylers": [
197		  	{"color":"#ffffff"}
198			]
199		},
200		{ "featureType": "road.local",
201		  "elementType": "geometry.fill",
202		  "stylers": [
203		  	{"color":"black"}
204			]
205		},
206		{ "featureType": "transit.station.airport",
207		  "elementType": "geometry.fill",
208		  "stylers": [
209		  	{"color":"#cfb2db"}
210			]
211		},
212		{ "featureType": "water",
213		  "elementType": "geometry",
214		  "stylers": [
215		  	{"color":"#a2daf2"}
216			]
217		}
218	];
219	return $styles;
220}

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.