PageSourceSearch

https://bonkombinezon.ru/local/templates/aspro_max/js/custom.js?17703671052501

js bonkombinezon.ru collected 2026-10-07 16:36:04 UTC 2,501 bytes, 58 lines download raw bytes

1/*
2You can use this file with your scripts.
3It will not be overwritten when you upgrade solution.
4*/
5
6$(document).ready(function () {
7
8    var toorder = function () {
9        if($('.button_block .to-order').length) {
10            $('.buy_block .block__dol').addClass('hide');
11        }
12        else {
13            $('.buy_block .block__dol').removeClass('hide');
14        }
15    };
16    $(document).on("click", ".list_values_wrapper li.item", function () {
17        toorder();
18    });
19    toorder();
20
21
22	
23
24});
25
26document.addEventListener("DOMContentLoaded", function() {
27    
28    // Функция замены текста
29    function replacePreorderText() {
30        // Используем хитрый селектор для класса "111", чтобы JS не ломался
31        // Ищем внутри .button_block элемент с классом, содержащим "111", и внутри него .more_text
32        const targetElement = document.querySelector('.button_block [class~="111"] .more_text') 
33                              || document.querySelector('.button_block .more_text'); // Запасной вариант без 111
34
35        if (targetElement && !targetElement.getAttribute('data-replaced')) {
36            targetElement.innerHTML = `
37                <span>Предзаказ</span> — возможность быстро оформить понравившуюся модель, которой сейчас нет в наличии.<br>
38                Нажмите кнопку <span>Оформить предзаказ</span>, чтобы оставить заявку и мы свяжемся с Вами в ближайшее время.<br>
39                <span>Срок изготовления товаров по предзаказу</span> — 5-7 рабочих дней.
40            `;
41            targetElement.setAttribute('data-replaced', 'true'); // Метка, чтобы не менять 100 раз
42            console.log('Текст предзаказа успешно заменен!');
43        }
44    }
45
46    // 1. Пробуем заменить сразу (если элемент уже есть)
47    replacePreorderText();
48
49    // 2. Запускаем слежку за изменениями в DOM (если это Pop-up или AJAX Bitrix)
50    const observer = new MutationObserver((mutations) => {
51        replacePreorderText();
52    });
53
54    observer.observe(document.body, {
55        childList: true,
56        subtree: true
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.