PageSourceSearch

https://a-markets.org/wp-content/plugins/amarkets-partials/account_types/js/common.js?ver=403.1175

js a-markets.org collected 2026-10-07 16:39:18 UTC 2,156 bytes, 65 lines download raw bytes

1jQuery(function($) {
2    init_shadow_height_handler();
3    init_column_highlight();
4
5    function init_shadow_height_handler() {
6        const debounced_set_shadow_height = debounce(set_shadow_height);
7
8        set_shadow_height();
9        $(window).on('resize', debounced_set_shadow_height);
10    }
11
12    function set_shadow_height() {
13        const $short_table = $('.compare--shorts, .review--shorts');
14
15        if ($short_table.length === 0) return;
16
17        const short_table_height = $short_table.outerHeight();
18        $short_table.css('--shadow-height', `${short_table_height}px`);
19    }
20
21    function debounce(func, delay = 150) {
22        let timeout_id;
23
24        return function (...args) {
25            clearTimeout(timeout_id);
26            timeout_id = setTimeout(() => func.apply(this, args), delay);
27        };
28    }
29
30    function init_column_highlight() {
31        const $table = $('.compare--shorts, .review--shorts');
32        const $highlight_cell = $table.find('.compare__row .highlight__cell, .review__row .highlight__cell').first();
33        const default_col_index = $highlight_cell.length ? $highlight_cell.index() : null;
34
35        if (default_col_index !== null) {
36            highlight_column(default_col_index);
37        }
38
39        $table.on('mouseenter', '.cell:not(.cell--label)', function () {
40            const col_index = $(this).index();
41
42            highlight_column(col_index);
43        });
44
45        $table.on('mouseleave', function () {
46            if (default_col_index !== null) {
47                highlight_column(default_col_index);
48            } else {
49                $('.compare__row .cell, .review__row .cell').removeClass('highlight__cell');
50            }
51        });
52
53        function highlight_column(index) {
54            $('.compare__row, .review__row').each(function () {
55                const $cells = $(this).find('.cell');
56                $cells.removeClass('highlight__cell');
57                const $target = $cells.eq(index);
58
59                if ($target.length && !$target.hasClass('cell--label')) {
60                    $target.addClass('highlight__cell');
61                }
62            });
63        }
64    }
65});

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.