PageSourceSearch

https://saryuya.com/momo/wp-content/plugins/shortcodes-ultimate/assets/js/other-shortcodes.js

js saryuya.com collected 2026-10-05 04:56:02 UTC 7,638 bytes, 240 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10jQuery(document).ready(function($) {
11
12	// Spoiler
13	$('body:not(.su-other-shortcodes-loaded)').on('click', '.su-spoiler-title', function(e) {
14		var $title = $(this),
15			$spoiler = $title.parent(),
16			bar = ($('#wpadminbar').length > 0) ? 28 : 0;
17		// Open/close spoiler
18		$spoiler.toggleClass('su-spoiler-closed');
19		// Close other spoilers in accordion
20		$spoiler.parent('.su-accordion').children('.su-spoiler').not($spoiler).addClass('su-spoiler-closed');
21		// Scroll in spoiler in accordion
22		if ($(window).scrollTop() > $title.offset().top) $(window).scrollTop($title.offset().top - $title.height() - bar);
23		e.preventDefault();
24	});
25	$('.su-spoiler-content').removeAttr('style');
26	// Tabs
27	$('body:not(.su-other-shortcodes-loaded)').on('click', '.su-tabs-nav span', function(e) {
28		var $tab = $(this),
29			data = $tab.data(),
30			index = $tab.index(),
31			is_disabled = $tab.hasClass('su-tabs-disabled'),
32			$tabs = $tab.parent('.su-tabs-nav').children('span'),
33			$panes = $tab.parents('.su-tabs').find('.su-tabs-pane'),
34			$gmaps = $panes.eq(index).find('.su-gmap:not(.su-gmap-reloaded)');
35		// Check tab is not disabled
36		if (is_disabled) return false;
37		// Hide all panes, show selected pane
38		$panes.hide().eq(index).show();
39		// Disable all tabs, enable selected tab
40		$tabs.removeClass('su-tabs-current').eq(index).addClass('su-tabs-current');
41		// Reload gmaps
42		if ($gmaps.length > 0) $gmaps.each(function() {
43			var $iframe = $(this).find('iframe:first');
44			$(this).addClass('su-gmap-reloaded');
45			$iframe.attr('src', $iframe.attr('src'));
46		});
47		// Set height for vertical tabs
48		tabs_height();
49		// Open specified url
50		if (data.url !== '') {
51			if (data.target === 'self') window.location = data.url;
52			else if (data.target === 'blank') window.open(data.url);
53		}
54		e.preventDefault();
55	});
56
57	// Activate tabs
58	$('.su-tabs').each(function() {
59		var active = parseInt($(this).data('active')) - 1;
60		$(this).children('.su-tabs-nav').children('span').eq(active).trigger('click');
61		tabs_height();
62	});
63
64	// Activate anchor nav for tabs and spoilers
65	anchor_nav();
66
67	// Lightbox
68	$(document).on('click', '.su-lightbox', function(e) {
69		e.preventDefault();
70		e.stopPropagation();
71		if ($(this).parent().attr('id') === 'su-generator-preview') $(this).html(su_other_shortcodes.no_preview);
72		else {
73			var type = $(this).data('mfp-type');
74			$(this).magnificPopup({
75				type: type,
76				tClose: su_magnific_popup.close,
77				tLoading: su_magnific_popup.loading,
78				gallery: {
79					tPrev: su_magnific_popup.prev,
80					tNext: su_magnific_popup.next,
81					tCounter: su_magnific_popup.counter
82				},
83				image: {
84					tError: su_magnific_popup.error
85				},
86				ajax: {
87					tError: su_magnific_popup.error
88				}
89			}).magnificPopup('open');
90		}
91	});
92	// Tables
93	$('.su-table tr:even').addClass('su-even');
94	// Frame
95	$('.su-frame-align-center, .su-frame-align-none').each(function() {
96		var frame_width = $(this).find('img').width();
97		$(this).css('width', frame_width + 12);
98	});
99	// Tooltip
100	$('.su-tooltip').each(function() {
101		var $tt = $(this),
102			$content = $tt.find('.su-tooltip-content'),
103			is_advanced = $content.length > 0,
104			data = $tt.data(),
105			config = {
106				style: {
107					classes: data.classes
108				},
109				position: {
110					my: data.my,
111					at: data.at,
112					viewport: $(window)
113				},
114				content: {
115					title: '',
116					text: ''
117				}
118			};
119		if (data.title !== '') config.content.title = data.title;
120		if (is_advanced) config.content.text = $content;
121		else config.content.text = $tt.attr('title');
122		if (data.close === 'yes') config.content.button = true;
123		if (data.behavior === 'click') {
124			config.show = 'click';
125			config.hide = 'click';
126			$tt.on('click', function(e) {
127				e.preventDefault();
128				e.stopPropagation();
129			});
130			$(window).on('scroll resize', function() {
131				$tt.qtip('reposition');
132			});
133		} else if (data.behavior === 'always') {
134			config.show = true;
135			config.hide = false;
136			$(window).on('scroll resize', function() {
137				$tt.qtip('reposition');
138			});
139		} else if (data.behavior === 'hover' && is_advanced) {
140			config.hide = {
141				fixed: true,
142				delay: 600
143			}
144		}
145		$tt.qtip(config);
146	});
147
148	// Expand
149	$('.su-expand').each(function() {
150		var $this = $(this),
151			$content = $this.children('.su-expand-content'),
152			$more = $this.children('.su-expand-link-more'),
153			$less = $this.children('.su-expand-link-less'),
154			data = $this.data(),
155			col = 'su-expand-collapsed';
156
157		$more.on('click', function(e) {
158			$content.css('max-height', 'none');
159			$this.removeClass(col);
160		});
161		$less.on('click', function(e) {
162			$content.css('max-height', data.height + 'px');
163			$this.addClass(col);
164		});
165	});
166
167	function is_transition_supported() {
168		var thisBody = document.body || document.documentElement,
169			thisStyle = thisBody.style,
170			support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
171
172		return support;
173	}
174
175	// Animations is supported
176	if (is_transition_supported()) {
177		// Animate
178		$('.su-animate').each(function() {
179			$(this).one('inview', function(e) {
180				var $this = $(this),
181					data = $this.data();
182				window.setTimeout(function() {
183					$this.addClass(data.animation);
184					$this.addClass('animated');
185					$this.css('visibility', 'visible');
186				}, data.delay * 1000);
187			});
188		});
189	}
190	// Animations isn't supported
191	else {
192		$('.su-animate').css('visibility', 'visible');
193	}
194
195	function tabs_height() {
196		$('.su-tabs-vertical').each(function() {
197			var $tabs = $(this),
198				$nav = $tabs.children('.su-tabs-nav'),
199				$panes = $tabs.find('.su-tabs-pane'),
200				height = 0;
201			$panes.css('min-height', $nav.outerHeight(true));
202		});
203	}
204
205	function anchor_nav() {
206		// Check hash
207		if (document.location.hash === '') return;
208		// Go through tabs
209		$('.su-tabs-nav span[data-anchor]').each(function() {
210			if ('#' + $(this).data('anchor') === document.location.hash) {
211				var $tabs = $(this).parents('.su-tabs'),
212					bar = ($('#wpadminbar').length > 0) ? 28 : 0;
213				// Activate tab
214				$(this).trigger('click');
215				// Scroll-in tabs container
216				window.setTimeout(function() {
217					$(window).scrollTop($tabs.offset().top - bar - 10);
218				}, 100);
219			}
220		});
221		// Go through spoilers
222		$('.su-spoiler[data-anchor]').each(function() {
223			if ('#' + $(this).data('anchor') === document.location.hash) {
224				var $spoiler = $(this),
225					bar = ($('#wpadminbar').length > 0) ? 28 : 0;
226				// Activate tab
227				if ($spoiler.hasClass('su-spoiler-closed')) $spoiler.find('.su-spoiler-title:first').trigger('click');
228				// Scroll-in tabs container
229				window.setTimeout(function() {
230					$(window).scrollTop($spoiler.offset().top - bar - 10);
231				}, 100);
232			}
233		});
234	}
235
236	if ('onhashchange' in window) $(window).on('hashchange', anchor_nav);
237
238	$('body').addClass('su-other-shortcodes-loaded');
239});
240}

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.