PageSourceSearch

https://www.hotelmanagement-network.com/wp-content/themes/goodlife-wp-B2B/assets/js/modules/paywall.js

js hotelmanagement-network.com collected 2026-09-24 18:36:56 UTC 1,924 bytes, 65 lines download raw bytes

1export default function paywall(selector = ".article-grid-2025 .locked", options = {}) {
2  const {
3    title = "Data center locked",
4    description = "To view all data center listings login or create a FREE account",
5  } = options;
6
7  const lockScreenMarkup = `
8<div class="lock-screen">
9                                    <h3>${title}</h3>
10                                    <p>${description}</p>
11                                    <div class="login-create-account">
12                                    <div class="button"><a href="">Login</a></div>
13                                    <p><a href="">Create an account</a></p>
14                                    </div>
15                                </div>
16                                <!-- .lock-screen -->`;
17
18  const injectLockScreens = () => {
19    const lockedCards = document.querySelectorAll(selector);
20
21    if (!lockedCards.length) {
22      return;
23    }
24
25    lockedCards.forEach((lockedCard) => {
26      if (lockedCard.querySelector(":scope > .lock-screen")) {
27        return;
28      }
29
30      lockedCard.insertAdjacentHTML("beforeend", lockScreenMarkup);
31    });
32  };
33
34  injectLockScreens();
35
36  const rerenderRoot =
37    document.querySelector("#solr-search-results") ||
38    document.querySelector(".results-by-facets") ||
39    document.querySelector(".article-grid-2025") ||
40    document.body;
41
42  let rafId = null;
43  const queueInject = () => {
44    if (rafId) return;
45    rafId = window.requestAnimationFrame(() => {
46      rafId = null;
47      injectLockScreens();
48    });
49  };
50
51  const observer = new MutationObserver(queueInject);
52  observer.observe(rerenderRoot, {
53    childList: true,
54    subtree: true,
55  });
56
57  document.addEventListener("click", (event) => {
58    if (
59      event.target.closest(".fancytree-checkbox") ||
60      event.target.closest(".selected-filters .fancytree-checkbox")
61    ) {
62      window.setTimeout(injectLockScreens, 0);
63    }
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.