PageSourceSearch

https://fleasting.com/themes/fashionseo/modules/ps_searchbar/ps_searchbar.js

js fleasting.com collected 2026-10-09 00:23:18 UTC 2,854 bytes, 61 lines download raw bytes

1/**
2 * Commercial name: SEO-Presta
3 * Proprietary-license whose copyright belongs to the Licensor PRESTA MODULE, a company registered under French law
4 * under the number 528 531 767, located 90 rue Stanislas Torrents 13006 Marseille
5 * [email protected] https://www.presta-module.com
6 *
7 * SEO-Presta’ source codes are protected and Licensees are not allowed to create any Derivated Work.
8 * The distribution or resale of SEO-Presta is strictly forbidden.
9 *
10 * SEO-Presta shall be used for Licensees’ own use, which allows Customization.
11 *
12 * Licensees shall not distribute nor resale publicly any Customization of SEO-Presta. However, Licensees are allowed
13 * to sale a customization of SEO-Presta as part of a service provided to a designated customer.
14 *
15 * Limitation of Liability: Under no circumstances and under no legal theory, whether in tort (including negligence),
16 * contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or
17 * consequential damages of any character arising as a result of this License including, without limitation, damages
18 * for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages
19 * or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
20 *
21 * Attribution notice: SEO-Presta is a Derivated Work from an Original Work created by PrestaShop SA
22 * and its contributors which can be found at https://github.com/PrestaShop/PrestaShop
23 */
24/* global $ */
25$(document).ready(function () {
26
27    var $searchWidget = $('#search_widget');
28    var $searchBox = $searchWidget.find('input[type=search],input[type=text]');
29    var searchURL = $searchWidget.attr('data-search-controller-url');
30
31    $.widget('prestashop.psBlockSearchAutocomplete', $.ui.autocomplete, {
32        _renderItem: function (ul, product) {
33            return $("<li>")
34                .append($("<a>")
35                    .append($("<span>").html(product.category_name).addClass("category"))
36                    .append($("<span>").html(' > ').addClass("separator"))
37                    .append($("<span>").html(product.name).addClass("product"))
38                ).appendTo(ul)
39                ;
40        }
41    });
42
43    $searchBox.psBlockSearchAutocomplete({
44        source: function (query, response) {
45            $.post(searchURL, {
46                s: query.term,
47                resultsPerPage: 10
48            }, null, 'json')
49                .then(function (resp) {
50                    response(resp.products);
51                })
52                .fail(response);
53        },
54        select: function (event, ui) {
55            var url = ui.item.url;
56            window.location.href = url;
57        },
58    });
59    // fix z-index on search engine
60    $("#searchModal").appendTo("body");
61});

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.