PageSourceSearch

https://www.hrowen.co.uk/wp-content/plugins/MLO-engage-widget/js/engage-handler.js?ver=1.0.2

js hrowen.co.uk collected 2026-10-02 07:47:17 UTC 1,552 bytes, 35 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2    const shortcodeAttributes =
3        (window.ivendiEngageData && window.ivendiEngageData.shortcodeAttributes) ||
4        window.shortcodeAttributes ||
5        null;
6
7    if (!shortcodeAttributes) {
8        return;
9    }
10
11    try {
12        const engage = new lib.Webshop(shortcodeAttributes);
13        engage.init();
14
15        document.addEventListener("engage:search:click:vehiclecard", function (event) {
16            const vehicle = event && event.detail ? event.detail.vehicle || {} : {};
17            const homeUrl = shortcodeAttributes.homeUrl || "";
18            const fpaStructure = shortcodeAttributes.fpaStructure || "fpa/{{id}}";
19
20            const fpaUrl = homeUrl + fpaStructure
21                .replace("{{make}}", encodeURIComponent(vehicle.make || ""))
22                .replace("{{model}}", encodeURIComponent(vehicle.model || ""))
23                .replace("{{deriv}}", encodeURIComponent(vehicle.derivative || ""))
24                .replace("{{doors}}", encodeURIComponent(vehicle.doors || ""))
25                .replace("{{bodystyle}}", encodeURIComponent(vehicle.bodyStyle || ""))
26                .replace("{{trans}}", encodeURIComponent(vehicle.transmission || ""))
27                .replace("{{fuel}}", encodeURIComponent(vehicle.fuel || ""))
28                .replace("{{id}}", encodeURIComponent(vehicle.vehicleId || ""));
29
30            window.location.href = fpaUrl;
31        });
32    } catch (error) {
33        console.error("Error initializing lib.Webshop:", error);
34    }
35});

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.