PageSourceSearch

https://www.stayadventurous.com/wp-content/plugins/instapress/instapress.js?ver=1.5.3

js stayadventurous.com collected 2026-10-02 05:07:02 UTC 4,426 bytes, 174 lines download raw bytes

1jQuery(document).ready(function($)
2{
3
4	/**
5	 * Initialisiert den Fancybox-Effekt für Fancybox-Links/Bilder
6	 */
7	function initFancyBox()
8	{
9		if(jQuery.fancybox)
10		{
11			$('.instagram-image a[rel=instagram-images],.instapress-shortcode a[rel=instagram-sc-images]').fancybox();
12		}
13	}
14	
15	/**
16	 * Initialisiert den Highslide-Effekt, sofern dieses Plugin installiert wurde
17	 */
18	function initHighslide()
19	{
20		$('.instapress-highslide').click(function()
21		{
22			
23			if(typeof(hs) !== 'undefined')
24				return hs.expand(this);
25			
26			alert("You need a Highslide Plugin for WordPress!");
27		});
28	}
29	
30	/**
31	 * Blättert für die angegebene Instanz auf die angegebene Seite
32	 * @param page int			Seitennumer beginnend bei 1
33	 * @param instanceId int	ID der Shortcode-Instanz
34	 */
35	function showPage(page, instanceId)
36	{
37		if(!instanceId)
38			var instanceId = 1;
39				
40		$('.next-page-instapress-' + instanceId).attr('rel', (page*1+1) + '-' + instanceId);
41		if(page > 1)
42		{
43			$('.prev-page-instapress-' + instanceId).attr('rel', page*1-1 + '-' + instanceId).show();
44		}
45		else
46		{
47			$('.prev-page-instapress-' + instanceId).hide();
48		}
49		$('#instapress-gallery-' + instanceId + ' .instapress-shortcode').hide();
50		$('#instapress-shortcode-' + instanceId + '-page-' + page).show();
51	}
52	
53	/**
54	 * Zeigt bzw. verbirgt die Ladeanzeige für die angegebene Instanz
55	 * @param instanceId int	ID der Shortcode-Instanz
56	 * @param hide Boolean		true = ausblenden, false = einblenden
57	 */
58	function loading(instanceId, hide)
59	{
60		if(!hide)
61		{
62			if($('#instapress-gallery-loading').length == 0)
63				$('body').append('<div id="instapress-gallery-loading" />');
64			var gallery = $('#instapress-gallery-' + instanceId + ' .instapress-shortcode-page:visible');
65			var offset = gallery.offset();
66			var w = gallery.outerWidth() / 2;
67			var h = gallery.outerHeight() / 2;
68			var t = offset.top + (h/2);
69			var l = offset.left + (w/2);
70			
71			$('#instapress-gallery-loading').css({ top : t, left: l, width : w, height : h}).show();
72		}
73		else
74		{
75			$('#instapress-gallery-loading').hide();
76		}
77	}
78	
79	/**
80	 * @return Gibt die Konfiguration für die Instanz mit der angegebenen ID zurück
81	 */
82	function getConfig(instanceId)
83	{
84		if(!instanceId)
85			var instanceId = 1;
86		
87		return eval('instapressConfig' + instanceId);
88	}
89	
90	var preloadedImagesCount = 0;
91	/**
92	 * @param instanceId int			ID der Instanz für die ein Bild geladen wurde
93	 * @param necessaryImageCount int	Anzahl der Fotos die geladen werden müssen
94	 */
95	function preloadedImage(instanceId, necessaryImageCount) {
96		preloadedImagesCount++;
97		if(preloadedImagesCount == necessaryImageCount) {
98			loading(instanceId, true);
99		}
100	}
101	
102	// Zurückblättern in der Galerie
103	$('.prev-page-instapress').live('click', function()
104	{
105		var rel = $(this).attr('rel');
106		var tmp = rel.split(/\-/);
107		var page = tmp[0];
108		var instanceId = parseInt(tmp[1]);
109		showPage(page, instanceId);
110		
111		return false;
112	});
113	
114	// Weiterblättern in der Galerie
115	$('.next-page-instapress').live('click', function()
116	{
117		var rel = $(this).attr('rel');
118		var tmp = rel.split(/\-/);
119		var page = tmp[0];
120		var instanceId = parseInt(tmp[1]);
121		var conf = getConfig(instanceId);
122		conf.paging = page;
123		var maxId = $('#instapress-' + conf.instanceid + '-next-max-id-' + page).val();
124		
125		if(!maxId || maxId.length == 0)
126			page = 1;
127		
128		if($('#instapress-shortcode' + conf.instanceid + '-page-' + page).length)
129		{
130			showPage(page, instanceId);
131			return false;
132		}
133		
134		// Ladeanzeige
135		loading(instanceId);
136		// Seite vom Server laden
137		$.post($(this).attr('href') + "/wp-admin/admin-ajax.php", 
138		{
139		    action : "instapress_paging",
140		    config : conf,
141		    nextMaxId : maxId 
142		}, function(response)
143		{
144			$('#instapress-gallery-' + instanceId).append(response);
145			var addedImages = $('#instapress-shortcode-' + instanceId + '-page-' + page + ' img');
146			
147			preloadedImagesCount = 0;
148			$.each(addedImages, function() {
149				var tmpImg = new Image();
150				tmpImg.src = $(this).attr('src');
151				tmpImg.onload = function() {
152					preloadedImage(instanceId, addedImages.length);
153				};
154			});
155			showPage(page, instanceId);
156			switch(conf.effect)
157			{
158				case 'fancybox':
159					initFancyBox();
160					break;
161				case 'highslide':
162					initHighslide();
163					break;
164			}
165		});   
166		
167		return false;
168	});
169	
170	// Beim Laden der Seite immer die Effekte versuchen zu initialisieren
171	initFancyBox();
172	initHighslide();
173	
174});

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.