PageSourceSearch

https://virtour.fr/tours/Demo/x.js

js virtour.fr collected 2026-10-04 02:48:22 UTC 20,319 bytes, 325 lines download raw bytes

1/*
2  Virtour/AccentSoft Initial Loader
3  Copyright 2017-2026 Petko YOTOV https://virtour.fr
4*/
5var GroupConf = { urls: {}, prefs: {} };
6var GroupConf = {
7    "urls": {
8        "agenceimmo7.com/annonces/achat/appartement/la-ferte-sous-jouarre-77/148909293.htm": "00002",
9        "agenceimmo7.com/annonces/locations/appartement/la-ferte-sous-jouarre-77/148659207.htm": "00002",
10        "agenceimmo7.com/annonces/locations/appartement/la-ferte-sous-jouarre-77/est-sud-ouest/148111215.htm": "00002",
11        "agenceimmo7.com/annonces/achat/appartement/jouarre-77/146585191.htm": "00002",
12        "agenceimmo7.com/annonces/locations/appartement/la-ferte-sous-jouarre-77/148170165.htm": "00002",
13        "agenceimmo7.com/annonces/achat/terrain/la-ferte-sous-jouarre-77/145281399.htm": "00002",
14        "agenceimmo7.com/annonces/achat/maison/la-ferte-sous-jouarre-77/nord-ouest/149212577.htm": "00002",
15        "agenceimmo7.com/annonces/achat/maison/la-ferte-sous-jouarre-77/147295109.htm": "00002",
16        "agenceimmo7.com/annonces/achat/maison/la-ferte-sous-jouarre-77/148967651.htm": "00002",
17        "agenceimmo7.com/annonces/achat/maison/la-ferte-sous-jouarre-77/nord-ouest/149494973.htm": "00002",
18        "agenceimmo7.com/annonces/achat/appartement/la-ferte-sous-jouarre-77/147295107.htm": "00002",
19        "fontenoy.com/detail-bien-a-vendre-11679": "00002",
20        "fontenoy.com/detail-bien-a-vendre-11567": "00002",
21        "fontenoy.com/detail-bien-a-vendre-10332": "00002",
22        "fontenoy.com/detail-bien-a-vendre-10130": "00002",
23        "fontenoy.com/detail-bien-a-vendre-9395": "00002",
24        "fontenoy.com/detail-bien-a-louer-11361": "00002",
25        "fontenoy.com/detail-bien-a-louer-10314": "00002",
26        "fontenoy.com/detail-bien-a-louer-6463": "00002",
27        "optimhome.com/annonces/vente/la_ferte_sous_jouarre/appartement/1340063-vente-la_ferte_sous_jouarre": "00002",
28        "optimhome.com/annonces/vente/la_ferte_sous_jouarre/appartement/1306178-vente-la_ferte_sous_jouarre": "00002",
29        "optimhome.com/annonces/vente/la_ferte_sous_jouarre/terrain_constructible/1287661-vente-la_ferte_sous_jouarre": "00002",
30        "optimhome.com/annonces/vente/la_ferte_sous_jouarre/appartement/1267016-vente-la_ferte_sous_jouarre": "00002",
31        "optimhome.com/annonces/vente/la_ferte_sous_jouarre/maison/1363440-vente-la_ferte_sous_jouarre": "00002",
32        "optimhome.com/annonces/vente/la_ferte_sous_jouarre/appartement/1310596-vente-la_ferte_sous_jouarre": "00002",
33        "yann-vrancken-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/149480935.htm": "00002",
34        "yann-vrancken-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/141815679.htm": "00002",
35        "yann-vrancken-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/146707235.htm": "00002",
36        "annemano.fr/details.php?lang=fr&agence_id=6476&bien_id=901943645": "00002",
37        "annemano.fr/details.php?lang=fr&agence_id=6476&bien_id=901943625": "00002",
38        "annemano.fr/details.php?lang=fr&agence_id=6476&bien_id=901943816": "00002",
39        "annemano.fr/details.php?lang=fr&agence_id=6476&bien_id=901943815": "00002",
40        "annemano.fr/details.php?lang=fr&agence_id=6476&bien_id=901943812": "00002",
41        "immobilier-memorial.fr/annonces/achat/appartement/la-ferte-sous-jouarre-77/145507285.htm": "00002",
42        "immobilier-memorial.fr/annonces/achat/appartement/la-ferte-sous-jouarre-77/137971223.htm": "00002",
43        "immobilier-memorial.fr/annonces/achat/appartement/la-ferte-sous-jouarre-77/137971225.htm": "00002",
44        "immobilier-memorial.fr/annonces/achat/appartement/la-ferte-sous-jouarre-77/132558945.htm": "00002",
45        "lafertesousjouarre-arthurimmo.com/annonces/achat/maison/la-ferte-sous-jouarre-77/149651291.htm": "00002",
46        "http://www.proximmonet.fr/fr/vente/1/145181-appartement-meaux-77100": "00002",
47        "http://www.proximmonet.fr/fr/vente/1/139342-appartement-meaux-77100": "00002",
48        "http://www.proximmonet.fr/fr/vente/1/43619-appartement-meaux-77100": "00002",
49        "http://www.proximmonet.fr/fr/vente/1/73021-appartement-meaux-77100": "00002",
50        "http://www.proximmonet.fr/fr/vente/1/124304-appartement-meaux-77100": "00002",
51        "http://www.proximmonet.fr/fr/vente/1/140104-appartement-meaux-77100": "00002",
52        "http://www.proximmonet.fr/fr/vente/1/143988-appartement-meaux-77100": "00002",
53        "http://www.proximmonet.fr/fr/vente/1/143989-appartement-meaux-77100": "00002",
54        "http://www.proximmonet.fr/fr/vente/1/143356-appartement-meaux-77100": "00002",
55        "https://www.orpi.com/annonce-vente-appartement-t3-meaux-77100-b-e1efhv/": "00002",
56        "https://www.orpi.com/annonce-vente-maison-t4-la-ferte-sous-jouarre-77260-b-e1embk/": "00002",
57        "https://www.orpi.com/annonce-vente-appartement-t3-meaux-77100-b-e1de5b/": "00002",
58        "https://www.orpi.com/annonce-vente-appartement-t4-la-ferte-sous-jouarre-77260-b-e1eki0/": "00002",
59        "orpi.com/annonce-vente-appartement-t3-meaux-77100-b-e1efhv/": "00002",
60        "orpi.com/annonce-vente-maison-t4-la-ferte-sous-jouarre-77260-b-e1embk/": "00002",
61        "orpi.com/annonce-vente-appartement-t3-meaux-77100-b-e1de5b/": "00002",
62        "orpi.com/annonce-vente-appartement-t4-la-ferte-sous-jouarre-77260-b-e1eki0/": "00002",
63        "http://www.kris-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/149544299.htm": "00002",
64        "https://www.coulommierspaysdebrie-tourisme.fr/offre-touristique/agenda/5108453-visite-guidee-cryptes-merovingiennes/": "00003",
65        "https://www.stgermain77-arthurimmo.com/annonces/achat/maison/mareuil-les-meaux-77/130126985.htm": "00004",
66        "http://www.yann-vrancken-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/155177371.htm": "00004",
67        "http://www.yann-vrancken-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/151207953.htm": "00004",
68        "maisons-still.fr/": "00004",
69        "http://www.kris-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/155507493.htm": "00004",
70        "http://www.kris-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/148430367.htm": "00004",
71        "http://www.kris-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/154287413.htm": "00004",
72        "http://www.kris-immobilier.fr/annonces/achat/maison/la-ferte-sous-jouarre-77/153436049.htm": "00004",
73        "https://www.admimmo.com/_bien-a-vendre/m1991-19-appartement-de-63-75m2.html": "00005",
74        "https://www.admimmo.com/_bien-a-vendre/m2096-19-appartement-en-vente.html": "00005",
75        "https://www.admimmo.com/_bien-a-vendre/m2036-19-maison-avec-cour.html": "00005",
76        "https://www.admimmo.com/_bien-a-vendre/m2123-19-maison-sur-terrain-de-147m2.html": "00005",
77        "http://www.immobilier-memorial.fr/annonces/achat/appartement/la-ferte-sous-jouarre-77/131994337.htm": "00005",
78        "http://www.immobilier-memorial.fr/annonces/achat/appartement/la-ferte-sous-jouarre-77/131279833.htm": "00005",
79        "https://www.lafertesousjouarre-arthurimmo.com/annonces/achat/appartement/la-ferte-sous-jouarre-77/151986845.htm": "00005",
80        "https://www.lafertesousjouarre-arthurimmo.com/annonces/achat/appartement/la-ferte-sous-jouarre-77/152142337.htm": "00005",
81        "https://www.stgermain77-arthurimmo.com/annonces/achat/maison/meaux-77/151229961.htm": "00005",
82        "https://www.stgermain77-arthurimmo.com/annonces/achat/maison/esbly-77/150887349.htm": "00005",
83        "https://www.stgermain77-arthurimmo.com/annonces/achat/maison/quincy-voisins-77/154124903.htm": "00005",
84        "http://www.proximmonet.fr/fr/vente/1/163107-appartement-meaux-77100": "00005",
85        "http://www.proximmonet.fr/fr/vente/1/161370-appartement-meaux-77100": "00005",
86        "http://www.proximmonet.fr/fr/vente/2/161108-appartement-meaux-77100": "00005",
87        "http://www.proximmonet.fr/fr/vente/1/161082-appartement-meaux-77100": "00005",
88        "https://www.anne-mano-immobilier.fr/immobilier/exclusivite-gare-a-pieds-15-minutes-2/": "00005"
89    },
90    "prefs": {
91        "iframeParentElement": "#vthome_frame, .block-page.property .block-html, body.page_plan #page #conteneur #contenu table[width=\"100%\"] td[colspan=\"2\"] a._vt_overlay_link, section.detail .container .description a._vt_overlay_link, #p_descriptif, #ligne-galerie, .container.details.main > .row > .details-desc, h2.detail-border-titre + p[itemprop=\"description\"], ul.detail-widgets + h2.h1-like + div.h3-like + p.detail-desc-txt, div.clearing-assembled > div > div.carousel, article > section.c-section > div.c-section__inner > div.o-container > p:nth-last-of-type(2), #localisation, section#realisations div.container #liste-m, .wpestate_estate_property_slider_section_wrapper",
92        "iframeParentAdjacent": "afterend",
93        "iframeCSS": "width: 960px; height: 480px;",
94        "linkOverlayParentElement": ".detail-desc-txt, .block-page.property .block-html, body.page_plan #page #conteneur #contenu table[width=\"100%\"] td[colspan=\"2\"], section.detail .container .description, #p_descriptif + p, .container.details.main > .row > .details-desc:nth-of-type(1), h2.detail-border-titre + p[itemprop=\"description\"], h2.h4 + p.read-more.shortened, article > section.c-section > div.c-section__inner > div.o-container > p:nth-last-of-type(2), #presentation",
95        "linkOverlayParentAdjacent": "beforeend",
96        "linkOverlayText": "Cliquer ici pour charger la visite virtuelle.",
97        "linkOverlayCSS": "",
98        "overlayCSS": "z-index: 99999;",
99        "listParentElement": "",
100        "listParentAdjacent": "beforebegin",
101        "listText": "Visite virtuelle",
102        "listTextCSS": "",
103        "watermarkMiddleText": "",
104        "watermarkBottomText": ""
105    }
106};
107;(function(script){
108  var div = document.createElement("div");
109  div.innerHTML = "<!--[if lte IE 9]><i></i><![endif]-->"; // stackoverflow.com/a/10965203
110  if (div.getElementsByTagName("i").length == 1) return;
111  function log() { for (var i =0; i<arguments.length; i++) console.log(arguments[i]); }
112  function dqs(str)  { return document.querySelector(str); }
113  function dqsa(str) { return document.querySelectorAll(str); }
114  function adjbe(el, html) { if (el) el.insertAdjacentHTML('beforeend',    html); }
115  function adjbb(el, html) { if (el) el.insertAdjacentHTML('beforebegin',  html); }
116  function adjae(el, html) { if (el) el.insertAdjacentHTML('afterend',     html); }
117  function adjab(el, html) { if (el) el.insertAdjacentHTML('afterbegin',   html); }
118  function aE(el, ev, fn) {
119    if(typeof el == 'string') el = dqsa(el);
120    for(var i=0; i<el.length; i++) el[i].addEventListener(ev, fn);
121  }
122  function tap(el, fn) {aE(el, 'click', fn);}
123  function ga(el, attr) { return el.getAttribute(attr); }
124  function sa(el, attr, val) { return el.setAttribute(attr, val); }
125  function zpad(n) { if(n<10) return "0"+n; return n; }
126  function hhmmss(d) { return zpad(d.getHours()) +''+ zpad(d.getMinutes()) +'' + zpad(d.getSeconds()); }
127  function normURL(x) {
128    return x.replace(/^https?:\/\//i, '').replace(/^www\./i, '').replace(/\#.*$/, '').replace(/\/+$/, '').replace(/(orpi\.com\/.*)\?.*$/, '$1');
129  }
130  window.dqs = dqs;
131  window.dqsa = dqsa;
132  function openoverlay(e){
133    e.preventDefault();
134    var o = dqs('#_vt_overlay');
135    o.style.display = 'block';
136    var H = o.offsetHeight, W = o.offsetWidth;
137    var h = Math.min(H-40, 450), w = Math.min(W-40, 800);
138    var top = (H-h)/2, left = (W-w)/2;
139    var url = ga(this, 'data-vturl');
140    if(! url) url = this.href;
141    var css = prefs.iframeCSS + 'margin-top: '+top+'px; ';
142    var html = iframehtml.replace(/%s/, url.replace(/\#.*$/, '')+'#start').replace(/%s/, css);
143    adjbe(o, html);
144    aE([document], 'keydown', overlaykey);
145  }
146  function overlaykey(e) {
147    if(e.key.match(/^(Escape|x|q)$/i)) closeoverlay(e);
148  }
149  function closeoverlay(e){
150    e.preventDefault();
151    var o = dqs('#_vt_overlay');
152    o.style.display = 'none';
153    document.removeEventListener('keydown', overlaykey);
154    var f = dqsa('#_vt_overlay iframe');
155    for(var i=0; i<f.length; i++) {
156      o.removeChild(f[i]);
157    }
158  }
159  function addoverlay(){
160    var o = dqs("#_vt_overlay");
161    if(o) return;
162    var html = '<div id="_vt_overlay" '
163    + 'style="display: none; position: fixed; top: 0; bottom: 0; z-index: 999; width: 100%; height: 100%; background-color: rgba(0, 0, 0, .5); %s">'
164    + '<svg id="_vt_overlay_close" height="30" width="30" style="float: right;stroke: #eee; stroke-width: 4px;cursor: pointer; margin: 6px 6px 0 0;">'
165    + '<path d="M 3 3 L 27 27 M 3 27 L 27 3" /></svg></div>';
166    html = html.replace(/%s/, prefs.overlayCSS);
167    adjbe(dqs('body'), html);
168    tap('#_vt_overlay_close', closeoverlay);
169  }
170  function getElementsAndPosition(query) {
171    var qq = query.split(/[\n\r,]+/g);
172    var ret = [];
173    for(var i=0; i<qq.length; i++) {
174      var pos = "";
175      var q = qq[i];
176      var a = qq.match(/^(.*)\|(.*)$/);
177      if(a) {
178        q = a[1];
179        var pos = a[2];
180      }
181      var x = dqsa(q);
182      for(var j=0; j<x.length; j++) ret.push([x[i], pos]);
183    }
184    return ret;
185  }
186  for(u in GroupConf.urls) {
187    var nu = normURL(u);
188    if(nu != u) GroupConf.urls[nu] = GroupConf.urls[u];
189  }
190  var prefs = GroupConf.prefs;
191  var customListSettings = { // always find <a> element
192    '#recherche-resultats-listing .annonce a, .detail-simi-item a': function(a) { // each i7, artur
193      var tags = a.querySelector('.annonce-tags, .detail-tags');
194      adjab(tags, '<div class="annonce-tag annonce-tag-360 detail-tag detail-tag-360" style="background:#ff0; color: #000; left:10px;">Visite virtuelle</div>');
195    },
196    'a.thumbnail.property': function(a) { // adm
197      var fa = a.querySelectorAll('i.fa');
198      if(!fa.length) return;
199      var lastfa = fa[fa.length - 1];
200      adjab(lastfa.parentNode, ' <i class="fa fa-street-view" style="color:#f40;" title="Visite virtuelle"></i> ');
201      adjab(lastfa.parentNode.parentNode, '<div style="position: absolute; left: 1px; bottom: 1px; width: 9em; text-align: center;"><i class="fa fa-street-view" title="Visite virtuelle"></i> Visite virtuelle</div>');
202    },
203    '.fieldsetAnnonce > .fieldsetLegend + span > a': function(a) { // font
204      adjbe(a, ' et <b>visite virtuelle</b>');
205    },
206    'section.liste div.item a.btnoffre': function(a) {
207      adjab(a.parentNode, ' <span style="display: block; position: absolute; top: 33px; right: 0; width: 202px; height: 30px; line-height: 30px; background: #fadc00; color: #000; text-align: center;">Visite virtuelle</span>');
208    },
209    '#recherche-resultats-listing-content .recherche-annonces .span8 > a': function(a) { // yv
210      var ppp = a.parentNode.parentNode.parentNode;
211      ppp.style.position = 'relative';
212      adjae(a.parentNode, ' <span class="box-shadow" style="display: block; border-radius: 4px; position: absolute; top: 8px; left: 8px; width: 150px; height: 30px; line-height: 30px; background: rgba(255, 255, 0, .75); color: #000; text-align: center;">Visite virtuelle</span>');
213    },
214    'article.product_damier > a.property_link': function(a) { // oh
215      var b = a.querySelector('div.badges');
216      if(b) adjbe(b, '<span class="has-badge badge-novelty">Visite 360°</span>');
217    },
218    '#recherche-resultats-listing .photo-agence-annonces a.recherche-annonces-lien': function(a) { // i memo
219      adjab(a, '<div style="position: absolute; top: 5px; left: 5px; width: auto; padding: 4px 8px; background: rgba(255, 255, 0, .75); color: black; z-index: 2; ">
219Visite virtuelle</div>');
220    },
221    '#recherche-resultats-listing a.hidden-desktop': function(a) { // i memo
222      a.style.position = 'relative';
223      adjab(a, '<div style="position: absolute; top: 6px; left: 4px; width: auto; padding: 2px 4px; background: rgba(255, 255, 0, .75); color: black; z-index: 2; ">Visite virtuelle</div>');
224    },
225    'div.overlay-container.selec-deluxe > a': function(a) { // pxin
226      var ul = a.querySelector('ul');
227      adjbe(ul, '<li><span class="label info radius white">Visite virtuelle</span></li>');
228    },
229    'section.properties > article.ui-property > .overlay-container > a': function(a) { // pxin
230      var div = a.querySelector('div.overlay-list-bien');
231      adjbe(a, '<div class="label right info margleft5" style="bottom:15px; left: 10px; position: absolute;"><span class="font-md">Visite virtuelle</span></div>');
232    },
233    'div[data-component="estate-result"] ul.u-list-unstyled > li > article h2 > a.u-link-unstyled.c-overlay__link': function(a){ // orpi
234      var p = a.parentNode;
235      while(p && p.tagName.toLowerCase() != 'article' && p.parentNode) p = p.parentNode;
236      var badges = p.querySelector('.c-box__badge ul');
237      adjbe(badges, '<li class="o-grid__col"><span class="c-badge c-badge--secondary c-badge--sm"><span class="c-badge__text">Visite virtuelle</span></span></li>');
238    }
239  };
240  function customListProcess() {
241    for(q in customListSettings) {
242      var x = dqsa(q);
243      for(var i=0; i<x.length; i++) {
244        if(ga(x[i], 'data-vt-done')) continue;
245        sa(x[i], 'data-vt-done', 1);
246        var h = normURL(x[i].href);
247        if(! GroupConf.urls.hasOwnProperty(h)) continue;
248        var fn = customListSettings[q];
249        fn(x[i]);
250      }
251    }
252  }
253  customListProcess();
254  setInterval(customListProcess, 2000);
255  var href = normURL(self.location.href);
256  var canvas = document.createElement("canvas");
257  var gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
258  if (! (gl && gl instanceof WebGLRenderingContext)  &&
259    ! ('WebkitAppearance' in document.documentElement.style ||
260        navigator.userAgent.match(/Trident.*rv[ :]*11\./) ||
261        navigator.appVersion.indexOf('MSIE 10') !== -1))
262    return;
263  var base = script.src.replace(/\/x.js$/, '');
264  var url = base + '/' + GroupConf.urls[href] + '/';
265  var iframehtml = '<iframe src="%s"'
266    +' style="display: block; width: 800px; height: 450px; max-width: 100%; margin: 0 auto; %s"'
267    +' class="_vt_iframe" frameborder="0" marginheight="0" marginwidth="0"'
268    +' webkitallowfullscreen mozallowfullscreen msallowfullscreen oallowfullscreen allowfullscreen></iframe>';
269  function prepareDirectLinks() {
270    let u = new URL(base);
271    let path = u.pathname.replace(/^(\/.+)\/[^\/]+$/, '$1');
272    let find = u.host.replace(/^www\./i, '') + path;
273    var q = 'a[href*="'+find+'"]';
274    if(location.hostname.match(/^virtour\.(fr|local)$/i)) q+=',a[href^="'+path+'"]';
275    var directlinks = dqsa(q);
276    console.log({u, base, q, directlinks});
277    for(var i=0; i<directlinks.length; i++) {
278      var h = directlinks[i].href;
279      if(h.match(/\/tours\/?$/)) continue;
280      if(h.match(/\#embed$/)) {
281        var hh = h.replace(/\#embed$/, '');
282        var html = iframehtml.replace(/%s/, hh).replace(/%s/, prefs.iframeCSS);
283        directlinks[i].insertAdjacentHTML('beforebegin', html);
284        directlinks[i].style.display = 'none';
285      }
286      else {
287        directlinks[i].classList.add('_vt_overlay_link');
288        directlinks[i].href = directlinks[i].href.replace(/\#.*$/g, '') + "#start";
289      }
290      addoverlay();
291    }
292  }
293  function embedIframe() {
294    if(prefs.iframeParentElement) {
295      var el = dqsa(prefs.iframeParentElement);
296      if(el.length) {
297        var html = iframehtml.replace(/%s/, url).replace(/%s/, prefs.iframeCSS);
298        var where = prefs.iframeParentAdjacent;
299        if(where == 'innerHTML') el[0].innerHTML = html;
300        else el[0].insertAdjacentHTML(where, html);
301      }
302    }
303  }
304  function processLinkOverlays() {
305    if(prefs.linkOverlayParentElement) {
306      var el = dqsa(prefs.linkOverlayParentElement);
307      if(el.length) {
308        var html = ' <a class="_vt_overlay_link" href="#" data-vturl="%s" style="%s"> '
309        + prefs.linkOverlayText
310        +'</a>';
311        html = html.replace(/%s/, url).replace(/%s/, prefs.linkOverlayCSS);;
312        var where = prefs.linkOverlayParentAdjacent;
313        if(where == 'innerHTML') el[0].innerHTML = html;
314        else el[0].insertAdjacentHTML(where, html);
315        addoverlay();
316      }
317    }
318  }
319  prepareDirectLinks();
320  if(GroupConf.urls.hasOwnProperty(href)) {
321    processLinkOverlays();
322    embedIframe();
323  }
324  tap('._vt_overlay_link', openoverlay);
325})(document.currentScript);

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.