PageSourceSearch

https://rx-true.com/vendor/jquery/init.js

js rx-true.com collected 2026-10-04 17:38:01 UTC 1,702 bytes, 61 lines download raw bytes

1/*
2 * Форматирование элемента автокомплита
3 */
4function liFormat(row, i, num) {
5    var result = row[0];
6    return result;
7}
8/*
9 * Действие при выборе элемента автокомплита
10 */
11function selectItem(li) {
12    if (li != null) {
13        location.href = "/" + li.extra[0];
14    }
15}
16
17$(document).ready(
18    function () {
19        /*
20         * Инициализация автокомплита (поиска по таблеткам)
21         */
22        $("#autocomplete").autocomplete(routeSearchAutocomplete, {
23            delay: 10,
24            minChars: 3,
25            matchSubset: 3,
26            matchCase: 0,
27            autoFill: false,
28            matchContains: 3,
29            cacheLength: 100,
30            cellSeparator: "||",
31            selectFirst: false,
32            maxItemsToShow: 30,
33            // scroll: true,
34            // context : this,
35            onItemSelect: selectItem,
36            focus: function (event, ui) {
37                this.value = ui.item.label;
38                $("#autocomplete").val(ui.item.label);
39                event.preventDefault(); // without this: keyboard movements reset the input to ''
40            },
41            formatItem: liFormat
42        });
43
44        if (!!document.getElementById("shopping_cart")) {
45            $.ajax({
46                url: routeCartContent,
47                type: 'GET',
48                cache: false,
49                dataType: 'html',
50                data: {},
51                success: function (data) {
52                    data = JSON.parse(data);
53                    $('#shopping_cart').html(data.html);
54                }
55            });
56        }
57
58    }
59
60
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.