PageSourceSearch

https://repair-dreame-msk.ru/assets/privacy-controls.js?v=20260914-auto1

js repair-dreame-msk.ru collected 2026-10-10 00:16:20 UTC 3,607 bytes, 67 lines download raw bytes

1/* Privacy controls, revision 2026-09-14-auto1. */
2(() => {
3  'use strict';
4
5  let analyticsLoaded = false;
6  window.sitePrivacyAnalyticsAllowed = () => true;
7
8  document.addEventListener('submit', event => {
9    const form = event.target;
10    if (!(form instanceof HTMLFormElement) || !/\/send\.php(?:[?#]|$)/.test(form.action)) return;
11    const consent = form.querySelector('input[name="consent"]');
12    if (!consent || !consent.checked || !form.checkValidity()) {
13      event.preventDefault();
14      event.stopImmediatePropagation();
15      form.reportValidity();
16    }
17  }, true);
18
19  function enableAnalytics() {
20    if (analyticsLoaded) return;
21    analyticsLoaded = true;
22    document.querySelectorAll('script[data-privacy-analytics]').forEach(old => {
23      const script = document.createElement('script');
24      const src = old.getAttribute('data-privacy-src');
25      if (src) {
26        script.src = src;
27        script.async = true;
28      } else {
29        script.textContent = old.textContent;
30      }
31      document.head.appendChild(script);
32    });
33    window.dispatchEvent(new Event('privacy:analytics-allowed'));
34  }
35
36  function initialize() {
37    const style = document.createElement('style');
38    style.textContent = 'form .privacy-note{display:block!important;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;min-height:0!important;width:auto!important;font-size:12px!important;line-height:1.5!important;margin:4px 0 8px!important;grid-column:1/-1}form .consent a,form .consent-line a{color:inherit;text-decoration:underline}.privacy-note a,.privacy-footer a{color:inherit;text-decoration:underline}.privacy-footer{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;column-gap:20px;row-gap:10px;padding:18px 0;margin:0 auto;background:transparent;border-top:1px solid #dce1e7;max-width:100%;clear:both}.privacy-footer a{display:inline-flex;align-items:center;font:14px/1.5 system-ui!important;line-height:1.5!important;margin:0;vertical-align:middle;text-align:left}.privacy-map-placeholder{position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:18px;border-radius:8px;background:#f1f5f9;color:#172033;font:14px/1.5 system-ui}.privacy-map-placeholder p{margin:0;font:inherit}.privacy-map-placeholder a{font:inherit;color:inherit;text-decoration:underline}.privacy-map-hidden-link{display:none!important}';
39    document.head.appendChild(style);
40
41    document.querySelectorAll('.privacy-footer').forEach(nav => {
42      const footer = nav.closest('footer');
43      if (!footer) return;
44      const reference = footer.querySelector('.footer-grid, .footer-main, .container, .wrap, .footer-top, .xm-footer-top');
45      if (!reference) return;
46      const align = () => {
47        const css = getComputedStyle(reference);
48        const width = reference.clientWidth - parseFloat(css.paddingLeft || 0) - parseFloat(css.paddingRight || 0);
49        if (width > 0) nav.style.width = width + 'px';
50      };
51      align();
52      if (window.ResizeObserver) new ResizeObserver(align).observe(reference);
53      else window.addEventListener('resize', align);
54    });
55
56    document.querySelectorAll('iframe[data-privacy-map-src]').forEach(frame => {
57      frame.src = frame.dataset.privacyMapSrc;
58      frame.hidden = false;
59    });
60
61    document.querySelectorAll('[data-privacy-settings]').forEach(control => control.remove());
62    enableAnalytics();
63  }
64
65  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', initialize);
66  else initialize();
67})();

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.