PageSourceSearch

https://reservation.ajaccio-tourisme.com/JsIframeResizer.js

js ajaccio-tourisme.com collected 2026-10-02 05:36:09 UTC 6,869 bytes, 242 lines download raw bytes

1	function FrameIngenie(params2, idFrame2) {
2		// debugger;
3	    this.adresse = 'https://reservation.ajaccio-tourisme.com';
4	    this.width =  '100%';
5	    this.height =  '1000px';
6				this.params2 = params2.replace(/\&/g, '&');
7		this.params2 = params2.replace('page=','pageExt=');
8		this.noIndex = true;
9		if (idFrame2 != undefined) {
10			this.idFrame2 = idFrame2;
11		} else {
12			this.idFrame2 = 'frameIngenie';
13		}
14	}
15
16	FrameIngenie.prototype = {
17
18		_this : "",
19
20		init: function(pObjFrame) {
21			//debugger;
22			if (pObjFrame != undefined) {
23				var _this = pObjFrame;
24			} else  {
25				var _this = this;
26				if (typeof objFrame != 'undefined') {
27					var pObjFrame = objFrame;
28				} else {
29					pObjFrame = _this
30				}
31			}
32
33
34			_this = _this.testSupported(_this);
35			if (!_this.supported) {
36				// On regarde si on a des info dur la hauteur de la frame dans l'url transmis
37				if (_this.getQueryVariable(pObjFrame.params2, 'mini') != false) {
38					_this.height = '340px';
39					if (_this.getQueryVariable(pObjFrame.params2, 'minHeight') != false) {
40						_this.height = _this.getQueryVariable(pObjFrame.params2, 'minHeight')+'px';
41					}
42				}
43
44				var tmpIframeIngenie = document.createElement('iframe');
45
46				tmpIframeIngenie.style.height = _this.height;
47				tmpIframeIngenie.style.width = _this.width;
48				tmpIframeIngenie.border = '0';
49				tmpIframeIngenie.frameBorder = '0'; // Pour IE 7
50				tmpIframeIngenie.style.border = 'none';
51				tmpIframeIngenie.title = "Formulaire";
52
53				tmpIframeIngenie.allowTransparency = true;
54
55				var tmp_adresse = _this.adresse+'/index.php?xdm_not_support=1&'+pObjFrame.params2;
56				if (this.noIndex) {
57					tmp_adresse = 'https://reservation.ajaccio-tourisme.com/'+pObjFrame.params2+'?xdm_not_support=1';
58					if (pObjFrame.params2.indexOf('?') >= 0) {
59						tmp_adresse = 'https://reservation.ajaccio-tourisme.com/'+pObjFrame.params2+'&xdm_not_support=1';
60					}
61
62				}
63
64				tmpIframeIngenie.src = tmp_adresse;
65				document.getElementById(_this.idFrame2).appendChild(tmpIframeIngenie);
66			} else {
67
68				var uid = 'ifI_'+Math.random().toString(36).substr(5);
69				eval(uid+' = _this;');
70				setTimeout(uid+'.timeout('+uid+')', 300);
71			}
72			if (document.getElementById(_this.idFrame2)) {
73				document.getElementById(_this.idFrame2).classList.add("loader");
74				let style = document.createElement('style');
75				style.innerHTML = `
76					#${_this.idFrame2}.loader {
77						position: relative;
78					}
79					#${_this.idFrame2}.loader::after {
80						position: absolute;
81						content: '';
82						display: block;
83						width: 50px;
84						height: 50px;
85						top: 25px;
86						left: calc(50% - 25px);
87						margin: 0 auto;
88						border-radius: 50%;
89						border: 5px solid #ccc;
90						border-top-color: #333;
91						animation: spin 1s infinite linear;
92					}
93					#${_this.idFrame2}.loader iframe {
94						filter: blur(10px);
95					}
96					@keyframes spin {
97						to {
98							transform: rotate(360deg);
99						}
100					}
101				`;
102				document.head.appendChild(style);
103			}
104		},
105
106		timeout: function(pObjFrame) {
107			var index = 'index.php?';
108			if (pObjFrame.noIndex) {
109				index = '';
110			}
111			var toRedirect = encodeURIComponent(index+pObjFrame.params2);
112			// On vide l'ancien contenu (multi-iframe)
113			var elFrame = document.getElementById(pObjFrame.idFrame2)
114			if (elFrame != null) {
115				elFrame.innerHTML = '';
116			}
117			new easyXDM.Socket({
118				remote: pObjFrame.adresse+"/provider.html?url="+toRedirect,
119				container: document.getElementById(pObjFrame.idFrame2),
120				props: {style: {width: pObjFrame.width} },
121				onMessage: function(message, origin){
122					this.container.getElementsByTagName("iframe")[0].allowTransparency = true;
123					// YD le 02/12 pour IE8 on augmente de 10 px sinon on a des scrollbars
124					if (document.all && document.querySelector && !document.addEventListener) {
125					    this.container.getElementsByTagName("iframe")[0].style.height = (parseInt(message)+10) + "px";
126					}else{
127					    this.container.getElementsByTagName("iframe")[0].style.height = message + "px";
128					}
129					if (this.container) {
130						this.container.classList.remove("loader");
131					}
132
133                    if ((typeof message === "string" || typeof message === "object") && message.indexOf('##') >= 0) {
134						// Remont�e d'autre chose
135						var dataPosted = message.replace('##', '');
136						var tabActions = dataPosted.split('|');
137						for (var i = 0; tabActions[i]; i++) {
138							try {
139								eval('var actionPosted = '+tabActions[i]);
140								if (actionPosted && actionPosted.action) {
141									if (actionPosted.action == 'scrollTo') {
142										// On doit r�cup�rer la position de l'iframe pour l'ajouter
143										var iframeHtml = this.container.getElementsByTagName("iframe")[0];
144										var positionTo = jQuery(iframeHtml).offset().top;
145										positionTo = parseInt(actionPosted.params.top)+parseInt(positionTo);
146										jQuery('html,body').animate({scrollTop: positionTo});
147									}
148								}
149							} catch (e) {
150								// Probl�me data
151								//debugger;
152							}
153						}
154					}
155				}
156			});
157
158		},
159
160		call: function(scriptCode) {
161			eval(scriptCode);
162		},
163
164		testSupported: function (pObjFrame) {
165			pObjFrame.supported = true;
166
167			// Faire tests de compatibilit�
168			if (document.all && !document.querySelector) {
169				// IE <= 7 => Pas support�
170				pObjFrame.supported = false;
171			}
172			if (document.all && document.querySelector && !document.addEventListener) {
173				// IE 8 => Mal support�
174				pObjFrame.supported = false;
175			}
176
177			return pObjFrame;
178		},
179
180		testFlash: function (pObjFrame) {
181			var flashinstalled = 0;
182			var flashversion = 0;
183			if (navigator.plugins && navigator.plugins.length)
184			{
185				x = navigator.plugins["Shockwave Flash"];
186				if (x)
187				{
188					flashinstalled = 2;
189					if (x.description)
190					{
191						y = x.description;
192						flashversion = y.charAt(y.indexOf('.')-1);
193					}
194				}
195				else
196					flashinstalled = 1;
197				if (navigator.plugins["Shockwave Flash 2.0"])
198				{
199					flashinstalled = 2;
200					flashversion = 2;
201				}
202			}
203			else if (navigator.mimeTypes && navigator.mimeTypes.length)
204			{
205				x = navigator.mimeTypes['application/x-shockwave-flash'];
206				if (x && x.enabledPlugin)
207					flashinstalled = 2;
208				else
209					flashinstalled = 1;
210			}
211			else
212			{
213				for(var i=7; i>0; i--){
214					flashVersion = 0;
215					try{
216						var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
217						flashversion = i;
218						flashinstalled = 2;
219						return;
220					}
221					catch(e){
222					}
223				}
224			}
225			pObjFrame.flashinstalled = flashinstalled;
226			pObjFrame.flashversion = flashversion;
227
228			return pObjFrame;
229		},
230
231		getQueryVariable: function (query, variable) {
232			var vars = query.split("&");
233			for (var i = 0; i < vars.length; i++) {
234				var pair = vars[i].split("=");
235				if (pair[0] == variable) {
236					return unescape(pair[1]);
237				}
238			}
239			return false;
240		}
241	}
242	

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.