PageSourceSearch

https://app.synchronize.ru/shop/widgets/scripts/embedded.js

js synchronize.ru collected 2026-09-24 09:24:52 UTC 2,021 bytes, 65 lines download raw bytes

1(function () {
2  if (window.__synchronizeEmbeddedLoaded) return;
3  window.__synchronizeEmbeddedLoaded = true;
4
5  const MOUNT_SELECTOR = 'turbo-frame, [data-synchro-embedded], [data-controller]';
6  const APP_HOST = 'app.synchronize.ru';
7
8  const params = new URLSearchParams(window.location.search);
9  const promoCode = params.get('promo_code') || params.get('promocode');
10
11  if (promoCode) {
12    document.addEventListener('turbo:before-fetch-request', event => {
13      const url = event.detail.url;
14      if (url.hostname !== APP_HOST || url.searchParams.has('promocode')) return;
15
16      url.searchParams.set('promocode', promoCode);
17    });
18  }
19
20  let stylesheetAppended = false;
21
22  function appendStylesheet() {
23    if (stylesheetAppended) return;
24    stylesheetAppended = true;
25
26    const link = document.createElement('link');
27    link.rel = 'stylesheet';
28    link.href = 'https://app.synchronize.ru/vite/assets/embedded-BoE9Aj2r.css';
29    document.head.appendChild(link);
30  }
31
32  function appendStylesheetWhenMounted() {
33    if (document.querySelector(MOUNT_SELECTOR)) return appendStylesheet();
34
35    const observer = new MutationObserver(records => {
36      for (const record of records) {
37        for (const node of record.addedNodes) {
38          if (node.nodeType !== Node.ELEMENT_NODE) continue;
39          if (!node.matches(MOUNT_SELECTOR) && !node.querySelector(MOUNT_SELECTOR)) continue;
40
41          observer.disconnect();
42          return appendStylesheet();
43        }
44      }
45    });
46
47    observer.observe(document.body, { childList: true, subtree: true });
48  }
49
50  if (document.readyState === 'loading') {
51    document.addEventListener('DOMContentLoaded', appendStylesheetWhenMounted);
52  } else {
53    appendStylesheetWhenMounted();
54  }
55
56  import('https://app.synchronize.ru/vite/assets/embedded-IHlcgZuy.js')
57    .then(module => {
58      if (module.default) {
59        module.default();
60      }
61    })
62    .catch(error => {
63      console.error('Ошибка загрузки модуля:', error);
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.