PageSourceSearch

https://contextus.hu/wp-content/plugins/adaptive-saleshouse-integr…ntextus-google-anchor-overlay.js?ver=2.0.77

js contextus.hu collected 2026-10-02 06:08:08 UTC 2,807 bytes, 80 lines download raw bytes

1(function () {
2  "use strict";
3
4  const anchorSelector = [
5    "body > ins.adsbygoogle-noablate[data-anchor-status]",
6    "body > ins[data-anchor-status][data-adsbygoogle-status]",
7    "html > ins.adsbygoogle-noablate[data-anchor-status]",
8    "html > ins[data-anchor-status][data-adsbygoogle-status]",
9  ].join(",");
10  const competingOverlaySelector = [
11    ".sticky-footer-container",
12    ".brid-sticky",
13    ".bplr-sticky",
14    "#adaptive_curtain",
15    ".am-full-layer",
16    "#adp-pushup-billboard",
17    "#adp-layer-bottom-container",
18    ".bottom-ad",
19    "#read-progress",
20    "dialog[open]",
21  ].join(",");
22
23  function intersectsViewport(element) {
24    const style = window.getComputedStyle(element);
25    if (style.display === "none" || style.visibility === "hidden") return false;
26
27    const bounds = element.getBoundingClientRect();
28    return bounds.width > 0 && bounds.height > 0 && bounds.bottom > 0 && bounds.top < window.innerHeight;
29  }
30
31  function syncGoogleAnchorOverlay() {
32    const anchors = Array.from(document.querySelectorAll(anchorSelector));
33    const competingOverlayVisible = Boolean(document.documentElement.hasAttribute("data-contextus-premium-active")) || Array.from(
34      document.querySelectorAll(competingOverlaySelector),
35    ).some(intersectsViewport);
36    let anchorActive = false;
37
38    anchors.forEach((anchor) => {
39      const displayed = anchor.getAttribute("data-anchor-status") === "displayed";
40      const overlay = displayed && !competingOverlayVisible;
41      const suppressed = displayed && competingOverlayVisible;
42
43      anchor.toggleAttribute("data-contextus-google-anchor-overlay", overlay);
44      anchor.toggleAttribute("data-contextus-google-anchor-suppressed", suppressed);
45      anchorActive ||= displayed;
46    });
47
48    document.documentElement.classList.toggle(
49      "contextus-google-anchor-active",
50      anchorActive,
51    );
52  }
53
54  let syncFrame = 0;
55  function scheduleSync() {
56    if (!syncFrame) syncFrame = window.requestAnimationFrame(() => { syncFrame = 0; syncGoogleAnchorOverlay(); });
57  }
58  const observer = new MutationObserver(scheduleSync);
59  observer.observe(document.documentElement, {
60    attributes: true,
61    attributeFilter: [
62      "class",
63      "data-adsbygoogle-status",
64      "data-anchor-status",
65      "hidden",
66      "style",
67      "open",
68      "data-contextus-premium-active",
69    ],
70    childList: true,
71    subtree: true,
72  });
73
74  window.addEventListener("resize", scheduleSync, { passive: true });
75  window.addEventListener("scroll", scheduleSync, { passive: true });
76  window.visualViewport?.addEventListener("resize", scheduleSync, { passive: true });
77  window.addEventListener("pageshow", scheduleSync);
78  window.addEventListener("contextus:premium-overlay-change", scheduleSync);
79  syncGoogleAnchorOverlay();
80})();

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.