var mod_query = ""; if(typeof modules_to_add == "undefined") { var modules_to_add = {}; var module_count = 0; } if(typeof mod == "undefined") { var helper_loaded = false; var mod = document.querySelector(modules_to_add[module_count]['query']); if(mod==null) { mod = document.querySelector(modules_to_add[module_count]['alternate_query']); } var my_domain = mod.src; my_domain = my_domain.substring(0,my_domain.indexOf("/",8)); var KUNDENHOMEPAGE = "https://www.sternpark.de"; var ERROR_PAGE = "/error/404.html"; } var redirectFragment = window.location.hash.replace(/^#/,''); var url_anchor = ""; if(redirectFragment!="") { url_anchor = "#"+redirectFragment } //Prüfung ob Snippet von Kundenseite oder unserer Seite geladen wurde, andere Seiten werden zur error-Page weitergeleitet if(window.top.location.href.indexOf(KUNDENHOMEPAGE)!==-1 || window.top.location.href.indexOf(my_domain)!==-1) { if(helper_loaded) { addModule(modules_to_add[module_count]['file']+url_anchor,modules_to_add[module_count]['query'],modules_to_add[module_count]['alternate_query']); } module_count++; if(document.querySelector('script[src*="/all_fahrzeugsuche_libs/responsive_iframe/includes/modul_helper.js"]')==null) { var helper= document.createElement('script'); helper.src= my_domain+'/all_fahrzeugsuche_libs/responsive_iframe/includes/modul_helper.js'; helper.onload= function() { for(var key in modules_to_add) { addModule(modules_to_add[key]['file']+url_anchor,modules_to_add[key]['query'],modules_to_add[key]['alternate_query']); } helper_loaded = true; } mod.parentNode.insertBefore(helper, mod.nextSibling); } } else { window.top.location.href = my_domain+ERROR_PAGE; }