PageSourceSearch

https://legal-wires.com/assets/js/ad.js?v=64687aacf4?v=35.0

js legal-wires.com collected 2026-10-02 16:23:50 UTC 5,078 bytes, 164 lines download raw bytes

1
2const adArray = [
3    {
4        type: "280x540",
5        url: "https://ik.imagekit.io/omjeem/LexAI.svg",
6        name: "Lex Live",
7        src: "https://lex.live",
8    },
9    // {
10    //   type: "728x90",
11    //   url: "https://ik.imagekit.io/omjeem/728x90.png?updatedAt=1726576583115",
12    //   name: "Billy ad",
13    //   src: "www.billu.com",
14    // },
15    // {
16    //   type: "280x280",
17    //   url: "https://ik.imagekit.io/omjeem/280x280.png?updatedAt=1726576582861",
18    //   name: "Billy ad",
19    //   src: "www.billu.com",
20    // },
21    // {
22    //   type: "280x50",
23    //   url: "https://ik.imagekit.io/omjeem/280x50.png?updatedAt=1726576582379",
24    //   name: "Billy ad",
25    //   src: "www.billu.com",
26    // },
27    // {
28    //   type: "1024x90",
29    //   url: "https://ik.imagekit.io/omjeem/728x90%20(1).png?updatedAt=1726904430063",
30    //   name: "Billy ad",
31    //   src: "www.billu.com",
32    // },
33];
34
35function createAddElementContainer(src, url) {
36    const adContainerElement = document.createElement("div");
37    adContainerElement.className = "ad-container-ele";
38    adContainerElement.onclick = () => {
39        window.location.href = src;
40    };
41
42    const adContainerImageElement = document.createElement("img");
43    adContainerImageElement.className = "ad-container-ele-img";
44    adContainerImageElement.src = url;
45    adContainerImageElement.style = "width: 100%;";
46
47    adContainerElement.appendChild(adContainerImageElement);
48    return adContainerElement;
49}
50
51function shuffleArray(array) {
52    for (let i = array.length - 1; i > 0; i--) {
53        const j = Math.floor(Math.random() * (i + 1));
54        [array[i], array[j]] = [array[j], array[i]];
55    }
56    return array;
57}
58
59function displayAds(adContainer, stickyAd) {
60    if (adContainer) {
61        const availableHeight = adContainer.offsetHeight;
62        let remainingHeight = availableHeight;
63
64        const sortedAds = adArray
65            .map((ad) => {
66                const [width, height] = ad.type.split("x").map(Number);
67                return { ...ad, width, height };
68            })
69            .filter((ad) => ad.width <= 280 && ad.height > 50);
70
71        const newArr = shuffleArray(sortedAds);
72
73        const addContainerInner = document.createElement("div");
74        if (stickyAd) {
75            addContainerInner.style =
76                "position: sticky; width: 300px; padding: 1.5rem;";
77        }
78
79        newArr.forEach((ad) => {
80            if (remainingHeight >= 50) {
81                addContainerInner.appendChild(
82                    createAddElementContainer(ad.src, ad.url)
83                );
84                remainingHeight -= ad.height;
85            }
86        });
87
88        adContainer.appendChild(addContainerInner);
89    }
90}
91
92document.addEventListener("DOMContentLoaded", function () {
93    const adContainer = document.getElementById("ad-container");
94    displayAds(adContainer, true);
95});
96
97document.addEventListener("DOMContentLoaded", function () {
98    function sortedAds(height, width) {
99        return adArray
100            .map((ad) => {
101                const [adWidth, adHeight] = ad.type.split("x").map(Number);
102                return { ...ad, width: adWidth, height: adHeight };
103            })
104            .filter((ad) => ad.height === height && ad.width === width);
105    }
106
107    function displayLeaderboardAd(array, adContainer) {
108        const addContainerInner = document.createElement("div");
109
110        array.forEach((ad) => {
111            addContainerInner.appendChild(createAddElementContainer(ad.src, ad.url));
112        });
113        adContainer.appendChild(addContainerInner);
114    }
115
116    const adContainerLg = document.getElementById("ad-leaderboard-lg");
117    const adContainerMd = document.getElementById("ad-leaderboard-md");
118    const adContainerSm = document.getElementById("ad-leaderboard-sm");
119
120    if (adContainerLg) {
121        const availableAds = sortedAds(90, 1024);
122        const newArr = shuffleArray(availableAds);
123        if (newArr.length > 0) {
124            adContainerLg.classList.add("ad-leaderboard-lg");
125            displayLeaderboardAd(newArr, adContainerLg);
126        }
127    }
128
129    if (adContainerMd) {
130        const availableAds = sortedAds(90, 728);
131        const newArr = shuffleArray(availableAds);
132        if (newArr.length > 0) {
133            adContainerMd.classList.add("ad-leaderboard-md");
134            displayLeaderboardAd(newArr, adContainerMd);
135        }
136    }
137
138    if (adContainerSm) {
139        const availableAds = sortedAds(50, 280);
140        const newArr = shuffleArray(availableAds);
141        if (newArr.length > 0) {
142            adContainerSm.classList.add("ad-leaderboard-sm");
143            displayLeaderboardAd(newArr, adContainerSm);
144        }
145    }
146});
147
148const tagArray = [
149    "events",
150    "lex-o-pedia",
151    "buzz",
152    "case-study",
153    "glossary",
154    "columns",
155];
156
157document.addEventListener("DOMContentLoaded", async function () {
158    // const tags = await getAllTags();
159
160    tagArray.map((tag) => {
161        const adContainer = document.getElementById(`ad-container-${tag}`);
162        displayAds(adContainer, true);
163    });
164});

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.