PageSourceSearch

https://remtech-sto.ru/wp-content/themes/remtech/assets/js/modal.js?ver=1791105843

js remtech-sto.ru collected 2026-10-04 09:24:36 UTC 1,616 bytes, 49 lines download raw bytes

1document.addEventListener("DOMContentLoaded", () => {
2  const modalHref = document.querySelectorAll("[data-modal]");
3
4  if (!modalHref) return;
5
6  modalHref.forEach((item) => {
7    item.addEventListener("click", (event) => handleModalOpen(event));
8  });
9
10  function handleModalOpen(event) {
11    const modalId = event.currentTarget.dataset.modal;
12    const modalTitle = event.currentTarget.dataset.title;
13    const modal = document.getElementById(modalId);
14    const modalContent = modal.querySelector(".modal__content");
15
16    modalContent.querySelector("h2").textContent = modalTitle;
17
18    const modalBrand = event.currentTarget.dataset.brand;
19
20    if (modalBrand) {
21      modalContent.querySelector('input[name="brand"]').value = modalBrand;
22      modalContent.querySelector('input[name="model"]').value = event.currentTarget.dataset.model;
23    }
24
25    const modalService = event.currentTarget.dataset.service;
26
27    if (modalService) {
28      modalContent.querySelector('input[name="service_name"]').value = modalService;
29    }
30
31    const modalVacancy = event.currentTarget.dataset.vacancy;
32
33    if (modalVacancy) {
34      modalContent.querySelector('input[name="vacancy"]').value = modalVacancy;
35    }
36
37    document.body.classList.add("lock");
38    modal.classList.add("open");
39
40    modal.addEventListener("click", (event) => {
41      const modalClose = event.target.closest(".modal__close");
42
43      if (modalClose || !modalContent.contains(event.target)) {
44        modal.classList.remove("open");
45        document.body.classList.remove("lock");
46      }
47    });
48  }
49});

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.