PageSourceSearch

https://www.marketworld.hu/!common_packages/jquery/own/shop_common…ch_smart_placeholder.js?mod_time=1751445028

js marketworld.hu collected 2026-10-06 01:59:02 UTC 2,020 bytes, 58 lines download raw bytes

1let actual_placeholder_index = [];
2let actual_placeholder_text = [];
3
4$(document).ready(function(){
5    if (typeof search_smart_placeholders !== 'undefined' && search_smart_placeholders.length > 0) {
6       $('.js-search-input').each(animatePlaceholder);
7    }
8});
9
10$(document).on('click', '.js-search-input', function() {
11    $(this).attr('placeholder', $(this).attr('data-placeholder-base')).removeClass('animated');
12});
13
14function animatePlaceholder() {
15    let el = $(this);
16    actual_placeholder_index[el.attr('id')] = 1;
17    actual_placeholder_text[el.attr('id')] = '';
18
19    el.attr('data-placeholder-base',el.attr('placeholder')).addClass('animated');
20    setTimeout(function(){ removeCharacters(el); }, 2000);
21}
22
23function removeCharacters(el) {
24    if (!el.hasClass('animated')) return;
25
26    let index = el.attr('id');
27    let new_placeholder = el.attr('placeholder').slice(0,-1);
28    el.attr('placeholder', new_placeholder);
29
30    if (new_placeholder !== '') {
31        setTimeout(function(){ removeCharacters(el); }, 40);
32    } else {
33        if (actual_placeholder_text[index] === '') {
34            actual_placeholder_text[index] = search_smart_placeholders[actual_placeholder_index[index]];
35            actual_placeholder_index[index]++;
36            if (search_smart_placeholders.length === actual_placeholder_index[index]) {
37                actual_placeholder_index[index] = 0;
38            }
39        }
40        setTimeout(function(){ addCharacters(el); }, 800);
41    }
42}
43
44function addCharacters(el) {
45    if (!el.hasClass('animated')) return;
46
47    let index = el.attr('id');
48    let nextChar = actual_placeholder_text[index].charAt(0);
49    actual_placeholder_text[index] = actual_placeholder_text[index].substring(1, actual_placeholder_text[index].length);
50
51    el.attr('placeholder', el.attr('placeholder') + nextChar);
52
53    if (actual_placeholder_text[index] !== '') {
54        setTimeout(function(){ addCharacters(el) }, 70);
55    } else {
56        setTimeout(function(){ removeCharacters(el); }, 1800);
57    }
58}

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.