PageSourceSearch

https://www.speeron.de/factfindersearch.js

js speeron.de collected 2026-10-08 09:41:32 UTC 2,860 bytes, 75 lines download raw bytes

1function searchClick(event) {
2    //alert("dddd"+event.data.id);
3
4    //alert($(`#olsSearchQueryId${event.data.id}`).prop('value')+":"+ event.data.brandId);
5
6    searchPrintResult($(`#olsSearchQueryId${event.data.id}`).prop('value'), event.data.brandId);
7
8    return false;
9}
10
11function searchPrintResult(query, brandId) {
12
13    $("body").css('cursor', 'wait');
14    $(".olsSearchSubmitClass" ).fadeOut(300);
15
16    $.getJSON(`/cgi-bin/factfinder.cgi?query=${query}&brandId=${brandId}`, function (json) {
17        $(".olsSearchSubmitClass" ).fadeIn(300);
18        $("body").css('cursor', 'default');
19
20        $("#searchResultBlockId").text("");
21        if (json != null && json.products != null) {
22            console.log(json.products.length);
23            $("#searchResultBlockId").addClass("brand_text radius3 border2");
24            if (json.products.length < 1) {
25                $("#searchResultBlockId").text("Ihre Suche ergab keine Ergebnisse.");
26            }
27            for (let i = 0; i < json.products.length ; i++) {
28                $("#searchResultBlockId").append(`<div id="pdid_${json.products[i].id}" style="margin-bottom: 20px;"></div><div style="clear:both;"></div>`);
29                printProductInfo(json.products[i].id, brandId);
30            }
31        }
32    });
33}
34
35function printProductInfo(pdId, brandId) {
36    $.getJSON(`/cgi-bin/product_info.cgi?pdId=${pdId}&brandId=${brandId}`, function (json) {
37        if (json != null) {
38            console.log(json);
39            $(`#pdid_${pdId}`).append(
40                `<div style="float: left; margin-right: 10px;">
41                    <img src="${json.smallPicturePath}" alt="Product Image" class="product_image">
42                </div>
43                <div>
44                    <a href="${json.url}">${json.pdIdSS} ${json.name}</a>
45                </div>
46                <div>
47                    <a>${json.description}</a>
48                </div>
49                <div>
50                    <a>${json.longDescription}</a>
51                </div>`
52            );
53        }
54    });
55}
56
57$("#header").ready(function() {
58    const searchBrandId = $("head").attr("data-brandid");
59
60    $("#header").after('<div id="searchResultBlockId"></div>');
61
62    for (let i=0; i< $(".google_form .search_input_box").length; i++) {
63        $($(".google_form .search_input_box")[i]).prop("id", `olsSearchQueryId${i}`);
64        $($(".google_form .search_input_box")[i]).addClass(`olsSearchQueryClass`);
65    }
66
67    for (let i=0; i< $(".google_form input[type=image]").length; i++) {
68        $($(".google_form input[type=image]")[i]).prop("id", `olsSearchSubmitId${i}`);
69        $($(".google_form input[type=image]")[i]).addClass(`olsSearchSubmitClass`);
70        $(`#olsSearchSubmitId${i}`).on( "click", {id:i, brandId: searchBrandId}, searchClick );
71    }
72
73    $(".olsSearchQueryClass").removeClass("search_input_box")
74});
75

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.