PageSourceSearch

https://www.klaeranlagen-vergleich.de/components/com_amazon/tmpl/js/amazon.min.js

js klaeranlagen-vergleich.de collected 2026-10-02 20:07:47 UTC 4,438 bytes, 1 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(event){const moreAmazonItems=document.querySelectorAll(".amz_items__last");const searchWord=document.getElementById("amz_search_input");const searchBtn=document.getElementById("amz_search_btn");const searchCategory=document.getElementById("amz_search_cat");const amz_items=document.getElementById("amz_items");const options={root:null,rootMargin:"-25% 0% -35% 0%",threshold:0};let pages=0;let scrollStop=false;const readJson=async url=>{const API_URL=url;const response=await fetch(API_URL);if(!response.ok){throw new Error(`An error occurred: ${response.status}`)}return await response.json()};const showLoader=()=>{let loader1=document.createElement("div");loader1.setAttribute("class","amz_item");loader1.setAttribute("id","loading");let loader2=document.createElement("div");loader2.setAttribute("class","lds-ring");let a=0;while(a<4){loader2.appendChild(document.createElement("div"));a++}loader1.appendChild(loader2);amz_items.appendChild(loader1)};const hideLoader=()=>{document.getElementById("loading").remove();amz_items.dataset.loading=0;amz_items.dataset.amazonpage=+amz_items.dataset.amazonpage+1;document.querySelectorAll(".amz_pages.active").forEach(active=>active.classList.remove("active"));document.getElementById("amz_page_"+ +amz_items.dataset.amazonpage).classList.add("active")};const buildItems=items=>{itemsJSON=JSON.parse(items);$i=1;itemsJSON.SearchResult.Items.forEach(function(entry){let asin=entry["ASIN"]["DisplayValue"];let title=entry["ItemInfo"]["Title"]["DisplayValue"];let price=(entry["OffersV2"]&&entry["OffersV2"]["Listings"]&&entry["OffersV2"]["Listings"][0]?entry["OffersV2"]["Listings"][0]["Price"]["Money"]["DisplayAmount"]:entry["Offers"]&&entry["Offers"]["Listings"]&&entry["Offers"]["Listings"][0]?entry["Offers"]["Listings"][0]["Price"]["DisplayAmount"]:"Preis auf Amazon");let link=entry["linkTitle"];let image=entry["Images"]["Primary"]["Large"]["URL"];let imageH=entry["Images"]["Primary"]["Large"]["Height"];let imageW=entry["Images"]["Primary"]["Large"]["Width"];let amz_item=document.createElement("div");if($i==10){amz_item.setAttribute("class","amz_item amz_items__last")}else{amz_item.setAttribute("class","amz_item")}amz_item.setAttribute("onclick",`window.location.href='${link}'`);let amz_item_img=document.createElement("div");amz_item_img.setAttribute("class","amz_item_img");let inner_img=document.createElement("img");inner_img.setAttribute("src",image);inner_img.setAttribute("alt","Bild: "+title);inner_img.setAttribute("height",imageH);inner_img.setAttribute("width",imageW);let amz_item_title=document.createElement("div");amz_item_title.setAttribute("class","amz_item_title");let inner_a=document.createElement("a");inner_a.setAttribute("href",link);inner_a.innerText=title;let amz_item_price=document.createElement("div");amz_item_price.setAttribute("class","amz_item_price");amz_item_price.innerHTML=price;amz_item_title.appendChild(inner_a);amz_item_img.appendChild(inner_img);amz_item.appendChild(amz_item_img);amz_item.appendChild(amz_item_title);amz_item.appendChild(amz_item_price);$i++;document.getElementById("amz_items").appendChild(amz_item)})};const loadItems=async()=>{if(document.querySelector(".amz_pages.active + a")==null){window.removeEventListener("scroll");return}if(document.getElementById("amz_items").dataset.loading==1)return;let url=document.querySelector(".amz_pages.active + a").getAttribute("href");url=url+"&format=jsn";setTimeout(async()=>{try{showLoader();const response=await readJson(url);if(JSON.parse(response.data).SearchResult.Items.length!=null){buildItems(response.data);hideLoader();scrollStop=false}else{hideLoader()}}catch(error){console.log(error.message)}finally{}},500)};const search=()=>{let itemid=document.getElementById("amz_item")?.dataset.itemid;if(amz_items!=null){itemid=amz_items.dataset.itemid}window.location.href=encodeURI(window.location.origin+"/index.php?option=com_amazon&view=items&minPrice=400&isSearch=1&searchWord="+searchWord.value+"&itemId="+itemid+"&searchIndex="+searchCategory.value)};if(amz_items!==null){window.addEventListener("scroll",()=>{const{scrollTop,scrollHeight,clientHeight}=document.documentElement;if(scrollTop+clientHeight>=scrollHeight-5&&scrollStop==false){loadItems();scrollStop=true}},{passive:true})}
1searchBtn.addEventListener("click",search);searchWord.addEventListener("keydown",event=>{if(event.key==="Enter"){search()}})});

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.