powered-ad-config 0.0.89 → 0.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/powered-ad-config.es.js +146 -135
- package/dist/powered-ad-config.umd.js +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const $ = (b) => {
|
|
2
2
|
const i = window.frameElement ? window.frameElement : null;
|
|
3
3
|
if (!i) return () => {
|
|
4
4
|
};
|
|
@@ -22,7 +22,7 @@ const _ = (b) => {
|
|
|
22
22
|
yPosHalfpage: 72,
|
|
23
23
|
stickyMargin: { offset: 72, isSticky: !0 },
|
|
24
24
|
zIndex: function() {
|
|
25
|
-
const o = window.parent.document, d = (
|
|
25
|
+
const o = window.parent.document, d = (v, t) => v.forEach((r) => t.forEach(([h, S]) => r.style[h] = S));
|
|
26
26
|
o.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector("article")?.setAttribute("style", "position:relative"), o.querySelector("#article")?.setAttribute("style", "position:relative"), o.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), o.querySelector("#Index")?.setAttribute("style", "position:relative"), o.querySelector(".show")?.setAttribute("style", "position:relative"), o.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), d(o.querySelectorAll(".column"), [["position", "relative"]]), d(o.querySelectorAll(".advert"), [["position", "relative"]]), d(o.querySelectorAll("blockquote"), [["zIndex", "1"]]), o.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:-24px"), o.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
|
|
27
27
|
}
|
|
28
28
|
}, A = {
|
|
@@ -35,7 +35,7 @@ const _ = (b) => {
|
|
|
35
35
|
yPosHalfpage: 32,
|
|
36
36
|
stickyMargin: { offset: 32, isSticky: !0 },
|
|
37
37
|
zIndex: function() {
|
|
38
|
-
const o = window.parent.document, d = (
|
|
38
|
+
const o = window.parent.document, d = (v, t) => v.forEach((r) => t.forEach(([h, S]) => r.style[h] = S));
|
|
39
39
|
o.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector("article")?.setAttribute("style", "position:relative"), o.querySelector("#article")?.setAttribute("style", "position:relative"), o.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), o.querySelector("#Index")?.setAttribute("style", "position:relative"), o.querySelector(".show")?.setAttribute("style", "position:relative"), d(o.querySelectorAll(".column"), [["position", "relative"]]), d(o.querySelectorAll(".advert"), [["position", "relative"]]), d(o.querySelectorAll("blockquote"), [["zIndex", "1"]]), o.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), o.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px"), o.querySelector('div[class*="MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px");
|
|
40
40
|
}
|
|
41
41
|
}, s = {
|
|
@@ -50,15 +50,15 @@ const _ = (b) => {
|
|
|
50
50
|
zIndex: function() {
|
|
51
51
|
const o = window.parent.document;
|
|
52
52
|
if (o.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style", "position:relative"), o.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style", "position:relative"), o.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style", "position:relative"), o.querySelector("small")?.setAttribute("style", "position:inherit"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
53
|
-
let
|
|
54
|
-
|
|
53
|
+
let v = o.createElement("style");
|
|
54
|
+
v.innerHTML = `
|
|
55
55
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
56
56
|
position: static;
|
|
57
57
|
}
|
|
58
|
-
`, o.head.appendChild(
|
|
58
|
+
`, o.head.appendChild(v);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
},
|
|
61
|
+
}, g = {
|
|
62
62
|
siteBackgroundColor: "#ffffff",
|
|
63
63
|
fireplaceLeftMargin: 0,
|
|
64
64
|
adNodeMarginTop: -24,
|
|
@@ -68,8 +68,8 @@ const _ = (b) => {
|
|
|
68
68
|
yPosHalfpage: 32,
|
|
69
69
|
stickyMargin: { offset: 104, isSticky: !0 },
|
|
70
70
|
zIndex: function() {
|
|
71
|
-
const o = window.parent.document,
|
|
72
|
-
if (
|
|
71
|
+
const o = window.parent.document, v = o.querySelector("footer").previousElementSibling;
|
|
72
|
+
if (v && v.tagName.toLowerCase() === "div" && (v.style.position = "relative"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
73
73
|
let r = o.createElement("style");
|
|
74
74
|
r.innerHTML = `
|
|
75
75
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
@@ -111,12 +111,12 @@ const _ = (b) => {
|
|
|
111
111
|
const o = window.parent.document;
|
|
112
112
|
o.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), o.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), o.querySelector(".content")?.setAttribute("style", "padding-top:32px"), o.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), o.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), o.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
|
|
113
113
|
}
|
|
114
|
-
},
|
|
115
|
-
{ site: "https://www.nine.com.au/sport", config:
|
|
114
|
+
}, B = [
|
|
115
|
+
{ site: "https://www.nine.com.au/sport", config: g },
|
|
116
116
|
{ site: "https://www.nine.com.au/product-reviews", config: A },
|
|
117
117
|
{ site: "https://www.nine.com.au/property", config: A },
|
|
118
118
|
{ site: "https://www.nine.com.au/entertainment", config: A },
|
|
119
|
-
{ site: "https://staging.nine.com.au/sport", config:
|
|
119
|
+
{ site: "https://staging.nine.com.au/sport", config: g },
|
|
120
120
|
{ site: "https://staging.nine.com.au/product-reviews", config: A },
|
|
121
121
|
{ site: "https://staging.nine.com.au/property", config: A },
|
|
122
122
|
{ site: "https://staging.nine.com.au/entertainment", config: A },
|
|
@@ -135,44 +135,44 @@ const _ = (b) => {
|
|
|
135
135
|
{ site: "https://kitchen", config: l },
|
|
136
136
|
{ site: "https://finance", config: l },
|
|
137
137
|
{ site: "https://wwos", config: x },
|
|
138
|
-
{ site: "https://staging.wwos", config:
|
|
138
|
+
{ site: "https://staging.wwos", config: g },
|
|
139
139
|
{ site: "https://www.9news", config: q },
|
|
140
140
|
{ site: "https://staging.9news", config: q },
|
|
141
141
|
{ site: "https://www.yourtv", config: l },
|
|
142
142
|
{ site: "https://staging.yourtv", config: l },
|
|
143
143
|
{ site: "https://9now", config: A },
|
|
144
144
|
{ site: "https://creative-preview-an.com", config: l }
|
|
145
|
-
],
|
|
145
|
+
], C = () => {
|
|
146
146
|
const o = window.document.getElementById("nineContent");
|
|
147
|
-
o && (o.style.backgroundColor = a.siteBackgroundColor),
|
|
148
|
-
},
|
|
147
|
+
o && (o.style.backgroundColor = a.siteBackgroundColor), L(), P(), y.addEventListener("scroll", I), n = setTimeout(I, 50);
|
|
148
|
+
}, N = () => {
|
|
149
149
|
let o = null;
|
|
150
150
|
return o = p.querySelector('div[id*="billboard"][id*="above"]'), o;
|
|
151
151
|
}, M = () => {
|
|
152
152
|
const o = y.location.href;
|
|
153
|
-
for (let d = 0; d <
|
|
154
|
-
if (o.indexOf(
|
|
155
|
-
return
|
|
156
|
-
},
|
|
153
|
+
for (let d = 0; d < B.length; d += 1)
|
|
154
|
+
if (o.indexOf(B[d].site) >= 0)
|
|
155
|
+
return B[d].config;
|
|
156
|
+
}, P = () => {
|
|
157
157
|
if (!i) return;
|
|
158
158
|
const o = i.style;
|
|
159
159
|
o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.transform = "translate(-50%, 0)";
|
|
160
|
-
},
|
|
161
|
-
if (!
|
|
162
|
-
const o =
|
|
163
|
-
|
|
160
|
+
}, L = () => {
|
|
161
|
+
if (!E) return;
|
|
162
|
+
const o = E.style;
|
|
163
|
+
E.className = "", o.minHeight = "250px", o.marginTop = a.adNodeMarginTop + "px", o.marginBottom = a.adNodeMarginBottom + "px", o.position = "static", o.display = "block", a.zIndex && a.zIndex();
|
|
164
164
|
}, I = () => {
|
|
165
|
-
const o = y.scrollY, d = i.style,
|
|
166
|
-
o >= 0 && o <=
|
|
167
|
-
},
|
|
165
|
+
const o = y.scrollY, d = i.style, v = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
166
|
+
o >= 0 && o <= u ? (d.transform = `translate(-50%, ${-o}px)`, v.transform = "translateY(0)") : o > u && o <= m ? (d.transform = `translate(-50%, ${-u}px)`, v.transform = `translateY(${u - o}px)`) : o > m && (d.transform = `translate(-50%, ${-u}px)`, v.transform = "translateY(-250px)");
|
|
167
|
+
}, E = N(), a = M();
|
|
168
168
|
if (!a) return () => {
|
|
169
169
|
};
|
|
170
170
|
let n = null;
|
|
171
|
-
const
|
|
172
|
-
return
|
|
171
|
+
const u = -a.responsiveScroll + b, m = u + 250;
|
|
172
|
+
return C(), () => {
|
|
173
173
|
y.removeEventListener("scroll", I), n && (clearTimeout(n), n = null);
|
|
174
174
|
};
|
|
175
|
-
},
|
|
175
|
+
}, _ = (b) => {
|
|
176
176
|
const i = window.frameElement ? window.frameElement : null;
|
|
177
177
|
if (!i) return () => {
|
|
178
178
|
};
|
|
@@ -188,7 +188,7 @@ const _ = (b) => {
|
|
|
188
188
|
}
|
|
189
189
|
const l = document.getElementById("nineMasthead"), A = l ? l.style : {};
|
|
190
190
|
let s;
|
|
191
|
-
const
|
|
191
|
+
const g = {
|
|
192
192
|
siteBackgroundColor: "#ffffff",
|
|
193
193
|
fireplaceLeftMargin: 0,
|
|
194
194
|
adNodeMarginTop: -24,
|
|
@@ -199,7 +199,7 @@ const _ = (b) => {
|
|
|
199
199
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
200
200
|
maskOffset: 298,
|
|
201
201
|
zIndex: function() {
|
|
202
|
-
const e = window.parent.document, c = (f, k) => f.forEach((w) => k.forEach(([T,
|
|
202
|
+
const e = window.parent.document, c = (f, k) => f.forEach((w) => k.forEach(([T, D]) => w.style[T] = D));
|
|
203
203
|
e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), e.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), c(e.querySelectorAll(".column"), [["position", "relative"]]), c(e.querySelectorAll(".advert"), [["position", "relative"]]), c(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
|
|
204
204
|
}
|
|
205
205
|
}, x = {
|
|
@@ -213,7 +213,7 @@ const _ = (b) => {
|
|
|
213
213
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
214
214
|
maskOffset: window.parent.document.querySelector('div[class*="video-index__MyContainer"]') ? 248 : 298,
|
|
215
215
|
zIndex: function() {
|
|
216
|
-
const e = window.parent.document, c = (f, k) => f.forEach((w) => k.forEach(([T,
|
|
216
|
+
const e = window.parent.document, c = (f, k) => f.forEach((w) => k.forEach(([T, D]) => w.style[T] = D));
|
|
217
217
|
e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), c(e.querySelectorAll(".column"), [["position", "relative"]]), c(e.querySelectorAll(".advert"), [["position", "relative"]]), c(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), e.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px"), e.querySelector('div[class*="MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px");
|
|
218
218
|
}
|
|
219
219
|
}, q = {
|
|
@@ -237,7 +237,7 @@ const _ = (b) => {
|
|
|
237
237
|
`, e.head.appendChild(f);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
},
|
|
240
|
+
}, B = {
|
|
241
241
|
siteBackgroundColor: "#ffffff",
|
|
242
242
|
fireplaceLeftMargin: 0,
|
|
243
243
|
adNodeMarginTop: -24,
|
|
@@ -258,7 +258,7 @@ const _ = (b) => {
|
|
|
258
258
|
`, e.head.appendChild(w);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, C = {
|
|
262
262
|
siteBackgroundColor: "#ffffff",
|
|
263
263
|
fireplaceLeftMargin: 0,
|
|
264
264
|
adNodeMarginTop: -25,
|
|
@@ -269,7 +269,7 @@ const _ = (b) => {
|
|
|
269
269
|
stickyMargin: { offset: 175, isSticky: !0 },
|
|
270
270
|
maskOffset: 274,
|
|
271
271
|
zIndex: function() {
|
|
272
|
-
const e = window.parent.document, c = (k, w) => k.forEach((T) => w.forEach(([
|
|
272
|
+
const e = window.parent.document, c = (k, w) => k.forEach((T) => w.forEach(([D, H]) => T.style[D] = H));
|
|
273
273
|
if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), c(e.querySelectorAll(".advert"), [["position", "relative"]]), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none"), e.querySelector(".score-strip")?.setAttribute("style", "display:none"), e.querySelector(".feed-header__breadcrumbs")?.setAttribute("style", "display:none"), e.querySelector(".layout.container")?.setAttribute("style", "padding:0"), e.querySelector(".empty-div")?.setAttribute("style", "display:none"), e.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
274
274
|
let k = e.createElement("style");
|
|
275
275
|
k.innerHTML = `
|
|
@@ -279,7 +279,7 @@ const _ = (b) => {
|
|
|
279
279
|
`, e.head.appendChild(k);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, N = {
|
|
283
283
|
siteBackgroundColor: "#ffffff",
|
|
284
284
|
fireplaceLeftMargin: 0,
|
|
285
285
|
adNodeMarginTop: -32,
|
|
@@ -296,11 +296,11 @@ const _ = (b) => {
|
|
|
296
296
|
c && (e.querySelector(".breadcrumbs")?.setAttribute("style", "display:none"), c.style.maxWidth = "1190px", c.style.margin = "auto", c.style.position = "relative");
|
|
297
297
|
}
|
|
298
298
|
}, M = [
|
|
299
|
-
{ site: "https://www.nine.com.au/sport", config:
|
|
299
|
+
{ site: "https://www.nine.com.au/sport", config: B },
|
|
300
300
|
{ site: "https://www.nine.com.au/product-reviews", config: x },
|
|
301
301
|
{ site: "https://www.nine.com.au/property", config: x },
|
|
302
302
|
{ site: "https://www.nine.com.au/entertainment", config: x },
|
|
303
|
-
{ site: "https://staging.nine.com.au/sport", config:
|
|
303
|
+
{ site: "https://staging.nine.com.au/sport", config: B },
|
|
304
304
|
{ site: "https://staging.nine.com.au/product-reviews", config: x },
|
|
305
305
|
{ site: "https://staging.nine.com.au/property", config: x },
|
|
306
306
|
{ site: "https://staging.nine.com.au/entertainment", config: x },
|
|
@@ -309,27 +309,27 @@ const _ = (b) => {
|
|
|
309
309
|
{ site: "https://preview.nine.com.au/", config: q },
|
|
310
310
|
{ site: "https://www.nine", config: q },
|
|
311
311
|
{ site: "https://staging.nine", config: q },
|
|
312
|
-
{ site: "https://entertainment", config:
|
|
313
|
-
{ site: "https://celebrity", config:
|
|
314
|
-
{ site: "https://homes", config:
|
|
315
|
-
{ site: "https://travel", config:
|
|
316
|
-
{ site: "https://honey", config:
|
|
317
|
-
{ site: "https://style", config:
|
|
318
|
-
{ site: "https://coach", config:
|
|
319
|
-
{ site: "https://kitchen", config:
|
|
320
|
-
{ site: "https://finance", config:
|
|
321
|
-
{ site: "https://wwos", config:
|
|
322
|
-
{ site: "https://staging.wwos", config:
|
|
323
|
-
{ site: "https://www.9news", config:
|
|
324
|
-
{ site: "https://staging.9news", config:
|
|
325
|
-
{ site: "https://www.yourtv", config:
|
|
326
|
-
{ site: "https://staging.yourtv", config:
|
|
312
|
+
{ site: "https://entertainment", config: g },
|
|
313
|
+
{ site: "https://celebrity", config: g },
|
|
314
|
+
{ site: "https://homes", config: g },
|
|
315
|
+
{ site: "https://travel", config: g },
|
|
316
|
+
{ site: "https://honey", config: g },
|
|
317
|
+
{ site: "https://style", config: g },
|
|
318
|
+
{ site: "https://coach", config: g },
|
|
319
|
+
{ site: "https://kitchen", config: g },
|
|
320
|
+
{ site: "https://finance", config: g },
|
|
321
|
+
{ site: "https://wwos", config: C },
|
|
322
|
+
{ site: "https://staging.wwos", config: B },
|
|
323
|
+
{ site: "https://www.9news", config: N },
|
|
324
|
+
{ site: "https://staging.9news", config: N },
|
|
325
|
+
{ site: "https://www.yourtv", config: g },
|
|
326
|
+
{ site: "https://staging.yourtv", config: g },
|
|
327
327
|
{ site: "https://9now", config: x },
|
|
328
|
-
{ site: "https://creative-preview-an.com", config:
|
|
329
|
-
],
|
|
328
|
+
{ site: "https://creative-preview-an.com", config: g }
|
|
329
|
+
], P = () => {
|
|
330
330
|
const e = window.document.getElementById("nineContent");
|
|
331
|
-
e && (e.style.backgroundColor = t.siteBackgroundColor), l && (A.setProperty("--masthead-height", "250px"), A.height = "var(--masthead-height)"), n(), a(), I(),
|
|
332
|
-
},
|
|
331
|
+
e && (e.style.backgroundColor = t.siteBackgroundColor), l && (A.setProperty("--masthead-height", "250px"), A.height = "var(--masthead-height)"), n(), a(), I(), u(), y.addEventListener("scroll", d, { passive: !0 }), r = setTimeout(d, 50);
|
|
332
|
+
}, L = () => {
|
|
333
333
|
let e = null;
|
|
334
334
|
return e = p.querySelector('div[id*="billboard"][id*="above"]'), e;
|
|
335
335
|
}, I = () => {
|
|
@@ -342,7 +342,7 @@ const _ = (b) => {
|
|
|
342
342
|
c.setAttribute("style", `top: ${t.stickyMargin.offset}px`);
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
|
-
},
|
|
345
|
+
}, E = () => {
|
|
346
346
|
const e = y.location.href;
|
|
347
347
|
for (let c = 0; c < M.length; c += 1)
|
|
348
348
|
if (e.indexOf(M[c].site) >= 0)
|
|
@@ -352,15 +352,15 @@ const _ = (b) => {
|
|
|
352
352
|
const e = i.style;
|
|
353
353
|
e.width = "100%", e.height = "1000px", e.position = "fixed", e.left = "50%", e.setProperty("--transform-y", "0px"), e.transform = "translate3d(-50%, var(--transform-y), 0)";
|
|
354
354
|
}, n = () => {
|
|
355
|
-
if (!
|
|
356
|
-
const e =
|
|
357
|
-
|
|
358
|
-
},
|
|
355
|
+
if (!v) return;
|
|
356
|
+
const e = v.style;
|
|
357
|
+
v.className = "", e.minHeight = "250px", e.marginTop = t.adNodeMarginTop + "px", e.marginBottom = t.adNodeMarginBottom + "px", e.position = "static", e.display = "block", t.zIndex && t.zIndex();
|
|
358
|
+
}, u = () => {
|
|
359
359
|
s = p.querySelector('div[data-contentunit-id="stan"]')?.parentNode || p.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode || p.querySelector('div[class*="__MyContainer"]') || p.querySelector('div[class*="__ArticleContainer"]') || p.querySelector('div[class*="__VideoIndexComponent"]') || p.querySelector("div.container.layout") || p.querySelector("main.container.layout"), s && (s.style.willChange = "clip-path", s.style.transition = "none", s.style.webkitBackfaceVisibility = "hidden", s.style.backfaceVisibility = "hidden", s.style.transform = "translate3d(0,0,0)", s.style.backgroundColor = t.siteBackgroundColor, s.style.setProperty("--mask-inset", "0px"), s.style.clipPath = "inset(var(--mask-inset, 0px) 0 0 0)");
|
|
360
360
|
};
|
|
361
|
-
let
|
|
361
|
+
let m = 0, o = 0;
|
|
362
362
|
const d = () => {
|
|
363
|
-
const e = y.scrollY, c = e >
|
|
363
|
+
const e = y.scrollY, c = e > m, f = e > S ? e - t.maskOffset : 0, k = Math.abs(f - o);
|
|
364
364
|
if (s)
|
|
365
365
|
if (c && f > o)
|
|
366
366
|
if (k > 100) {
|
|
@@ -370,16 +370,16 @@ const _ = (b) => {
|
|
|
370
370
|
s.style.transition = "clip-path 0.3s ease-out", s.style.setProperty("--mask-inset", `${f}px`);
|
|
371
371
|
else
|
|
372
372
|
s.style.transition = "none", s.style.setProperty("--mask-inset", `${f}px`);
|
|
373
|
-
|
|
374
|
-
},
|
|
373
|
+
m = e, o = f, e > S ? (i.style.setProperty("--transform-y", `${-h}px`), A.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : e > h && e <= S ? (i.style.setProperty("--transform-y", `${-h}px`), A.setProperty("--masthead-height", `${250 + h - e}px`), window.CollantOn && window.goBillboard()) : e >= 0 && e <= h && (i.style.setProperty("--transform-y", `${-e}px`), A.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
|
|
374
|
+
}, v = L(), t = E();
|
|
375
375
|
if (!t) return () => {
|
|
376
376
|
};
|
|
377
377
|
let r = null;
|
|
378
378
|
const h = -t.responsiveScroll + b, S = h + 150;
|
|
379
|
-
return
|
|
379
|
+
return P(), () => {
|
|
380
380
|
y.removeEventListener("scroll", d), r && (clearTimeout(r), r = null);
|
|
381
381
|
};
|
|
382
|
-
},
|
|
382
|
+
}, R = (b, i, y) => {
|
|
383
383
|
const p = window.frameElement ? window.frameElement : null;
|
|
384
384
|
if (!p) return () => {
|
|
385
385
|
};
|
|
@@ -405,7 +405,7 @@ const _ = (b) => {
|
|
|
405
405
|
const t = window.parent.document, r = (h, S) => h.forEach((e) => S.forEach(([c, f]) => e.style[c] = f));
|
|
406
406
|
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), r(t.querySelectorAll(".advert"), [["position", "relative"]]), t.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
|
|
407
407
|
}
|
|
408
|
-
},
|
|
408
|
+
}, g = {
|
|
409
409
|
siteBackgroundColor: "#ffffff",
|
|
410
410
|
logoTop: "44px",
|
|
411
411
|
logoLeft: "50%",
|
|
@@ -441,7 +441,7 @@ const _ = (b) => {
|
|
|
441
441
|
const t = window.parent.document, r = (h, S) => h.forEach((e) => S.forEach(([c, f]) => e.style[c] = f));
|
|
442
442
|
t.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style", "position:relative"), t.querySelector(".container--ads")?.setAttribute("style", "min-height:0"), t.getElementById("mastheadAnchorToggle")?.setAttribute("style", "display:none"), r(t.querySelectorAll(".advert"), [["position", "relative"]]), r(t.querySelectorAll("iframe"), [["position", "relative"]]), t.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style", "position:relative"), t.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style", "position:relative"), r(t.querySelectorAll("small"), [["position", "relative"]]), t.querySelector("small")?.setAttribute("style", "position:inherit"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
|
|
443
443
|
}
|
|
444
|
-
},
|
|
444
|
+
}, B = {
|
|
445
445
|
siteBackgroundColor: "#ffffff",
|
|
446
446
|
logoTop: "-148px",
|
|
447
447
|
logoLeft: "50%",
|
|
@@ -453,7 +453,7 @@ const _ = (b) => {
|
|
|
453
453
|
const t = window.parent.document, r = (h, S) => h.forEach((e) => S.forEach(([c, f]) => e.style[c] = f));
|
|
454
454
|
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), r(t.querySelectorAll(".advert"), [["position", "relative"]]), t.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
|
|
455
455
|
}
|
|
456
|
-
},
|
|
456
|
+
}, C = {
|
|
457
457
|
siteBackgroundColor: "#ffffff",
|
|
458
458
|
logoTop: "44px",
|
|
459
459
|
logoLeft: "50%",
|
|
@@ -465,7 +465,7 @@ const _ = (b) => {
|
|
|
465
465
|
const t = window.parent.document;
|
|
466
466
|
t.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), t.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), t.querySelector(".content")?.setAttribute("style", "padding-top:32px"), t.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), t.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), t.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
|
|
467
467
|
}
|
|
468
|
-
},
|
|
468
|
+
}, N = [
|
|
469
469
|
{ site: "https://www.nine.com.au/sport", config: s },
|
|
470
470
|
{ site: "https://www.nine.com.au/product-reviews", config: x },
|
|
471
471
|
{ site: "https://www.nine.com.au/property", config: x },
|
|
@@ -479,55 +479,55 @@ const _ = (b) => {
|
|
|
479
479
|
{ site: "https://preview.nine.com.au/", config: q },
|
|
480
480
|
{ site: "https://www.nine", config: q },
|
|
481
481
|
{ site: "https://staging.nine", config: q },
|
|
482
|
-
{ site: "https://entertainment", config:
|
|
483
|
-
{ site: "https://celebrity", config:
|
|
484
|
-
{ site: "https://homes", config:
|
|
485
|
-
{ site: "https://travel", config:
|
|
486
|
-
{ site: "https://honey", config:
|
|
487
|
-
{ site: "https://style", config:
|
|
488
|
-
{ site: "https://coach", config:
|
|
489
|
-
{ site: "https://kitchen", config:
|
|
490
|
-
{ site: "https://finance", config:
|
|
491
|
-
{ site: "https://wwos", config:
|
|
492
|
-
{ site: "https://staging.wwos", config:
|
|
493
|
-
{ site: "https://www.9news", config:
|
|
494
|
-
{ site: "https://staging.9news", config:
|
|
495
|
-
{ site: "https://www.yourtv", config:
|
|
496
|
-
{ site: "https://staging.yourtv", config:
|
|
482
|
+
{ site: "https://entertainment", config: g },
|
|
483
|
+
{ site: "https://celebrity", config: g },
|
|
484
|
+
{ site: "https://homes", config: g },
|
|
485
|
+
{ site: "https://travel", config: g },
|
|
486
|
+
{ site: "https://honey", config: g },
|
|
487
|
+
{ site: "https://style", config: g },
|
|
488
|
+
{ site: "https://coach", config: g },
|
|
489
|
+
{ site: "https://kitchen", config: g },
|
|
490
|
+
{ site: "https://finance", config: g },
|
|
491
|
+
{ site: "https://wwos", config: B },
|
|
492
|
+
{ site: "https://staging.wwos", config: B },
|
|
493
|
+
{ site: "https://www.9news", config: C },
|
|
494
|
+
{ site: "https://staging.9news", config: C },
|
|
495
|
+
{ site: "https://www.yourtv", config: g },
|
|
496
|
+
{ site: "https://staging.yourtv", config: g },
|
|
497
497
|
{ site: "https://9now", config: x },
|
|
498
|
-
{ site: "https://creative-preview-an.com", config:
|
|
498
|
+
{ site: "https://creative-preview-an.com", config: g }
|
|
499
499
|
], M = () => {
|
|
500
500
|
const t = window.document.getElementById("logo-small");
|
|
501
|
-
t && (t.style.left =
|
|
502
|
-
},
|
|
501
|
+
t && (t.style.left = m.logoSmallLeft, t.style.transform = m.logoSmallTransform, t.style.filter = m.logoSmallFilter), E(), I(), l.addEventListener("scroll", n), o = setTimeout(n, 50);
|
|
502
|
+
}, P = () => {
|
|
503
503
|
let t = null;
|
|
504
504
|
return t = A.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
|
|
505
|
-
},
|
|
505
|
+
}, L = () => {
|
|
506
506
|
const t = l.location.href;
|
|
507
|
-
for (let r = 0; r <
|
|
508
|
-
if (t.indexOf(
|
|
509
|
-
return
|
|
507
|
+
for (let r = 0; r < N.length; r += 1)
|
|
508
|
+
if (t.indexOf(N[r].site) >= 0)
|
|
509
|
+
return N[r].config;
|
|
510
510
|
}, I = () => {
|
|
511
511
|
if (!p) return;
|
|
512
512
|
const t = p.style;
|
|
513
513
|
t.width = "100%", t.height = `${i}px`, t.position = "relative";
|
|
514
|
-
},
|
|
515
|
-
if (!
|
|
516
|
-
const t =
|
|
517
|
-
t.maxHeight = `${i}px`, t.minHeight = `${i}px`, t.marginTop = "0px", t.marginBottom = "0px", t.position = "absolute", t.width = "1900px", t.top =
|
|
514
|
+
}, E = () => {
|
|
515
|
+
if (!u) return;
|
|
516
|
+
const t = u.style;
|
|
517
|
+
t.maxHeight = `${i}px`, t.minHeight = `${i}px`, t.marginTop = "0px", t.marginBottom = "0px", t.position = "absolute", t.width = "1900px", t.top = m.logoTop, t.left = m.logoLeft, t.transform = m.logoTransform, t.zIndex = "10000", t.pointerEvents = "none", m.zIndex && m.zIndex();
|
|
518
518
|
}, a = (t) => {
|
|
519
|
-
if (!
|
|
520
|
-
const r =
|
|
521
|
-
t === "big" && !window.bigActive ? (r.maxHeight = `${i}px`, r.minHeight = `${i}px`, r.position = "absolute", r.top =
|
|
519
|
+
if (!u) return;
|
|
520
|
+
const r = u.style;
|
|
521
|
+
t === "big" && !window.bigActive ? (r.maxHeight = `${i}px`, r.minHeight = `${i}px`, r.position = "absolute", r.top = m.logoTop, r.zIndex = "10000", window.loadBig()) : t === "small" && !window.smallActive && (r.maxHeight = `${y}px`, r.minHeight = `${y}px`, r.position = "fixed", r.top = "0px", r.zIndex = "100000", window.loadSmall());
|
|
522
522
|
}, n = () => {
|
|
523
523
|
const t = l.scrollY;
|
|
524
|
-
p.style, t >= 0 && t <= d ? a("big") : t > d && (t >
|
|
525
|
-
},
|
|
526
|
-
if (!
|
|
524
|
+
p.style, t >= 0 && t <= d ? a("big") : t > d && (t > v ? a("small") : a("big"), v = t <= 0 ? 0 : t);
|
|
525
|
+
}, u = P(), m = L();
|
|
526
|
+
if (!m) return () => {
|
|
527
527
|
};
|
|
528
528
|
let o = null;
|
|
529
529
|
const d = b;
|
|
530
|
-
let
|
|
530
|
+
let v = 0;
|
|
531
531
|
return M(), () => {
|
|
532
532
|
l.removeEventListener("scroll", n), o && (clearTimeout(o), o = null);
|
|
533
533
|
};
|
|
@@ -541,6 +541,14 @@ const _ = (b) => {
|
|
|
541
541
|
// How tall the ad container is — controls how long the ad stays in view.
|
|
542
542
|
// 100vh = scrolls away after one viewport height; 200vh = twice as long, etc.
|
|
543
543
|
adScrollHeight: "300vh",
|
|
544
|
+
// Reveal mode
|
|
545
|
+
// Controls how the ad creative enters the viewport as the user scrolls.
|
|
546
|
+
// 'clip' (default) — iframe stays fixed at top:0; the clip-path on the
|
|
547
|
+
// container unmasks the creative from the bottom up.
|
|
548
|
+
// 'slide' — iframe top tracks the container top so the creative
|
|
549
|
+
// slides in anchored to the top band, then snaps to
|
|
550
|
+
// top:0 once the container clears the viewport top.
|
|
551
|
+
revealMode: "clip",
|
|
544
552
|
// Band dimensions
|
|
545
553
|
bandHeight: 24,
|
|
546
554
|
// px — height of both bands
|
|
@@ -554,7 +562,7 @@ const _ = (b) => {
|
|
|
554
562
|
bandFontFamily: "Arial, Helvetica, sans-serif",
|
|
555
563
|
bandLetterSpacing: "1px",
|
|
556
564
|
// Band labels
|
|
557
|
-
labelTop: "
|
|
565
|
+
labelTop: "Advertisement4",
|
|
558
566
|
labelBottomResume: "Scroll to continue",
|
|
559
567
|
// shown from 0–20% ad progress
|
|
560
568
|
labelBottomMid: "Keep scrolling",
|
|
@@ -576,8 +584,8 @@ const _ = (b) => {
|
|
|
576
584
|
snapOverlap: 2,
|
|
577
585
|
// px — fires the snap this many px early (trigger timing)
|
|
578
586
|
stretchOverlap: 4,
|
|
579
|
-
// px —
|
|
580
|
-
//
|
|
587
|
+
// px — offsets the touchpoint this many px early, so the
|
|
588
|
+
// stretch animation begins before the band reaches the viewport bottom
|
|
581
589
|
snapDuration: 0.9,
|
|
582
590
|
// seconds for the snap return
|
|
583
591
|
// CSS timing function for the snap — any valid CSS transition-timing-function.
|
|
@@ -623,7 +631,7 @@ const _ = (b) => {
|
|
|
623
631
|
})();
|
|
624
632
|
if (!s) return () => {
|
|
625
633
|
};
|
|
626
|
-
const
|
|
634
|
+
const g = s.getAttribute("style"), x = y.getAttribute("style"), q = {
|
|
627
635
|
width: "100vw",
|
|
628
636
|
marginLeft: "calc(50% - 50vw)",
|
|
629
637
|
height: i.bandHeight + "px",
|
|
@@ -643,15 +651,16 @@ const _ = (b) => {
|
|
|
643
651
|
a.height = i.adScrollHeight, a.position = "relative", a.clipPath = `inset(-${i.bandHeight}px 0 0 0)`, a.overflow = "visible", a.width = "100vw", a.maxWidth = "100vw", a.marginLeft = "calc(50% - 50vw)", a.marginRight = "0", a.marginTop = "0", a.marginBottom = "0", a.padding = "0", a.className = "";
|
|
644
652
|
const n = y.style;
|
|
645
653
|
n.position = "fixed", n.top = "0", n.left = "0", n.width = "100vw", n.height = "100vh", n.maxWidth = "100vw", n.margin = "0", n.padding = "0", n.border = "none", n.zIndex = "1";
|
|
646
|
-
const
|
|
647
|
-
|
|
654
|
+
const u = l.createElement("div");
|
|
655
|
+
u.id = "interscroller-top-band", u.textContent = i.labelTop, Object.assign(u.style, q, {
|
|
648
656
|
position: "sticky",
|
|
649
657
|
bottom: "0",
|
|
658
|
+
...i.revealMode === "slide" && { marginBottom: `-${i.bandHeight}px` },
|
|
650
659
|
zIndex: i.zIndexTop,
|
|
651
660
|
transformOrigin: "top center"
|
|
652
661
|
});
|
|
653
|
-
const
|
|
654
|
-
|
|
662
|
+
const m = s.previousElementSibling;
|
|
663
|
+
m ? m.appendChild(u) : s.parentElement.insertBefore(u, s);
|
|
655
664
|
const o = l.createElement("div");
|
|
656
665
|
o.id = "interscroller-bottom-band", Object.assign(o.style, q, {
|
|
657
666
|
position: "relative",
|
|
@@ -664,8 +673,8 @@ const _ = (b) => {
|
|
|
664
673
|
});
|
|
665
674
|
const d = l.createElement("span");
|
|
666
675
|
if (d.id = "interscroller-bottom-label", d.textContent = i.labelBottomResume, d.style.cssText = "position:relative;z-index:1;pointer-events:none;", o.appendChild(d), i.progressBarColor) {
|
|
667
|
-
const
|
|
668
|
-
|
|
676
|
+
const v = l.createElement("span");
|
|
677
|
+
v.id = "interscroller-bottom-progress", v.style.cssText = [
|
|
669
678
|
"position:absolute",
|
|
670
679
|
"inset:0",
|
|
671
680
|
"width:0%",
|
|
@@ -673,26 +682,28 @@ const _ = (b) => {
|
|
|
673
682
|
"transition:none",
|
|
674
683
|
"z-index:0",
|
|
675
684
|
"pointer-events:none"
|
|
676
|
-
].join(";"), o.appendChild(
|
|
685
|
+
].join(";"), o.appendChild(v);
|
|
677
686
|
}
|
|
678
687
|
s.after(o);
|
|
679
688
|
})();
|
|
680
|
-
const
|
|
681
|
-
let M = !1,
|
|
682
|
-
const I = (i.thresholds || []).map(() => !1),
|
|
689
|
+
const C = i.bandHeight, N = i.snapPx;
|
|
690
|
+
let M = !1, P = !1, L = !1;
|
|
691
|
+
const I = (i.thresholds || []).map(() => !1), E = () => {
|
|
683
692
|
const a = l.querySelector("#interscroller-top-band"), n = l.querySelector("#interscroller-bottom-band");
|
|
684
693
|
if (!n) return;
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
694
|
+
const u = s.getBoundingClientRect(), m = p.innerHeight, o = u.top <= m, d = u.bottom <= m - C;
|
|
695
|
+
i.revealMode === "slide" && (y.style.top = o && u.top > 0 ? `${u.top}px` : "0");
|
|
696
|
+
const v = s.offsetHeight, t = Math.min(1, Math.max(0, (m - u.top) / (v + m))), r = Math.min(1, Math.max(0, (m - u.top) / (v + C))), h = Math.min(1, Math.max(0, (m - u.top) / v)), S = Math.min(u.bottom, m) - Math.max(u.top - C, 0), e = Math.min(1, Math.max(0, S / m)), c = Math.max(0, Math.round(u.bottom - m));
|
|
697
|
+
if (!P && o && i.onEnter && i.onEnter(), !L && d && i.onExit && i.onExit(), P = o, L = d, i.onProgress && i.onProgress({ scrollProgress: t, adExposure: h, viewportCoverage: e, pxRemaining: c }), (i.thresholds || []).forEach((w, T) => {
|
|
698
|
+
const D = I[T], H = t >= w.at;
|
|
699
|
+
!D && H ? (I[T] = !0, w.onEnter && w.onEnter(t)) : D && !H && (I[T] = !1, w.onLeave && w.onLeave(t));
|
|
700
|
+
}), a && u.top <= m + i.stretchOverlap && !d) {
|
|
701
|
+
const w = m - u.top;
|
|
702
|
+
if (!M && w <= N - i.snapOverlap) {
|
|
703
|
+
const T = 1 + Math.max(0, w + i.stretchOverlap) / C;
|
|
704
|
+
a.style.transition = "none", a.style.transform = `scaleY(${T})`;
|
|
705
|
+
} else !M && w > N - i.snapOverlap && (M = !0, a.style.transition = `transform ${i.snapDuration}s ${i.snapEase}`, a.style.transform = "scaleY(1)");
|
|
706
|
+
} else a && u.top > m + i.stretchOverlap && (M = !1, a.style.transition = "none", a.style.transform = "scaleY(1)");
|
|
696
707
|
const f = l.querySelector("#interscroller-bottom-label"), k = l.querySelector("#interscroller-bottom-progress");
|
|
697
708
|
if (d)
|
|
698
709
|
n.style.position = "sticky", n.style.top = "0", n.style.bottom = "", n.style.left = "", n.style.marginLeft = "calc(50% - 50vw)", n.style.width = "100vw", n.style.display = "flex", f && (f.textContent = i.labelBottomNow), k && (k.style.width = "100%");
|
|
@@ -703,10 +714,10 @@ const _ = (b) => {
|
|
|
703
714
|
} else
|
|
704
715
|
n.style.display = "none";
|
|
705
716
|
};
|
|
706
|
-
return
|
|
707
|
-
p.removeEventListener("scroll",
|
|
717
|
+
return E(), p.addEventListener("scroll", E, { passive: !0 }), p.visualViewport?.addEventListener("resize", E, { passive: !0 }), () => {
|
|
718
|
+
p.removeEventListener("scroll", E), p.visualViewport?.removeEventListener("resize", E);
|
|
708
719
|
const a = l.querySelector("#interscroller-top-band"), n = l.querySelector("#interscroller-bottom-band");
|
|
709
|
-
a && a.remove(), n && n.remove(),
|
|
720
|
+
a && a.remove(), n && n.remove(), g ? s.setAttribute("style", g) : s.removeAttribute("style"), x ? y.setAttribute("style", x) : y.removeAttribute("style");
|
|
710
721
|
};
|
|
711
722
|
};
|
|
712
723
|
let z = () => {
|
|
@@ -715,7 +726,7 @@ function U({ adFormat: b = "", stickyOffset: i = 0, logoPosX: y = 0, logoHeight:
|
|
|
715
726
|
typeof z == "function" && z();
|
|
716
727
|
let s = () => {
|
|
717
728
|
};
|
|
718
|
-
return b === "fireplace" ? s =
|
|
729
|
+
return b === "fireplace" ? s = $(i) : b === "fireplace-collant" ? s = _(i) : b === "logomorph" ? s = R(y, p, l) : b === "interscroller" ? s = X(A) : console.warn("[powered-ad-config] Unknown ad format:", b), z = typeof s == "function" ? s : () => {
|
|
719
730
|
}, z;
|
|
720
731
|
}
|
|
721
732
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(H,z){typeof exports=="object"&&typeof module<"u"?module.exports=z():typeof define=="function"&&define.amd?define(z):(H=typeof globalThis<"u"?globalThis:H||self,H.poweredAdConfig=z())})(this,(function(){"use strict";const H=b=>{const i=window.frameElement?window.frameElement:null;if(!i)return()=>{};const y=window.parent;if(!y||y===window)return()=>{};let p=null;try{p=y.document,y.location.href}catch{return()=>{}}const l={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:72,stickyMargin:{offset:72,isSticky:!0},zIndex:function(){const o=window.parent.document,d=(
|
|
1
|
+
(function(H,z){typeof exports=="object"&&typeof module<"u"?module.exports=z():typeof define=="function"&&define.amd?define(z):(H=typeof globalThis<"u"?globalThis:H||self,H.poweredAdConfig=z())})(this,(function(){"use strict";const H=b=>{const i=window.frameElement?window.frameElement:null;if(!i)return()=>{};const y=window.parent;if(!y||y===window)return()=>{};let p=null;try{p=y.document,y.location.href}catch{return()=>{}}const l={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:72,stickyMargin:{offset:72,isSticky:!0},zIndex:function(){const o=window.parent.document,d=(v,t)=>v.forEach(r=>t.forEach(([h,S])=>r.style[h]=S));o.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),o.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),o.querySelector("article")?.setAttribute("style","position:relative"),o.querySelector("#article")?.setAttribute("style","position:relative"),o.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),o.querySelector("#Index")?.setAttribute("style","position:relative"),o.querySelector(".show")?.setAttribute("style","position:relative"),o.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style","position:relative"),d(o.querySelectorAll(".column"),[["position","relative"]]),d(o.querySelectorAll(".advert"),[["position","relative"]]),d(o.querySelectorAll("blockquote"),[["zIndex","1"]]),o.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style","max-width:1190px;margin-top:-24px"),o.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),o.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none")}},A={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:32,stickyMargin:{offset:32,isSticky:!0},zIndex:function(){const o=window.parent.document,d=(v,t)=>v.forEach(r=>t.forEach(([h,S])=>r.style[h]=S));o.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),o.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),o.querySelector("article")?.setAttribute("style","position:relative"),o.querySelector("#article")?.setAttribute("style","position:relative"),o.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),o.querySelector("#Index")?.setAttribute("style","position:relative"),o.querySelector(".show")?.setAttribute("style","position:relative"),d(o.querySelectorAll(".column"),[["position","relative"]]),d(o.querySelectorAll(".advert"),[["position","relative"]]),d(o.querySelectorAll("blockquote"),[["zIndex","1"]]),o.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style","position:relative"),o.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style","max-width:1190px;margin-top:24px"),o.querySelector('div[class*="MyContainer"]')?.setAttribute("style","max-width:1190px;margin-top:24px")}},s={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-25,adNodeMarginBottom:-13,responsiveScroll:-120,xPosHalfpage:722,yPosHalfpage:32,stickyMargin:{offset:8,isSticky:!0},zIndex:function(){const o=window.parent.document;if(o.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style","position:relative"),o.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style","position:relative"),o.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style","position:relative"),o.querySelector("small")?.setAttribute("style","position:inherit"),o.querySelector('div[id*="tablet"][id*="takeover"]')){let v=o.createElement("style");v.innerHTML=`
|
|
2
2
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
3
3
|
position: static;
|
|
4
4
|
}
|
|
5
|
-
`,o.head.appendChild(
|
|
5
|
+
`,o.head.appendChild(v)}}},g={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:32,stickyMargin:{offset:104,isSticky:!0},zIndex:function(){const o=window.parent.document,v=o.querySelector("footer").previousElementSibling;if(v&&v.tagName.toLowerCase()==="div"&&(v.style.position="relative"),o.querySelector('div[id*="tablet"][id*="takeover"]')){let r=o.createElement("style");r.innerHTML=`
|
|
6
6
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
7
7
|
position: static;
|
|
8
8
|
}
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
11
11
|
position: static;
|
|
12
12
|
}
|
|
13
|
-
`,o.head.appendChild(t)}}},q={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:18,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:16,isSticky:!0},zIndex:function(){const o=window.parent.document;o.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),o.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),o.querySelector(".content")?.setAttribute("style","padding-top:32px"),o.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),o.querySelector(".footer-ad")?.setAttribute("style","position:relative"),o.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);")}},
|
|
13
|
+
`,o.head.appendChild(t)}}},q={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:18,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:16,isSticky:!0},zIndex:function(){const o=window.parent.document;o.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),o.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),o.querySelector(".content")?.setAttribute("style","padding-top:32px"),o.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),o.querySelector(".footer-ad")?.setAttribute("style","position:relative"),o.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);")}},B=[{site:"https://www.nine.com.au/sport",config:g},{site:"https://www.nine.com.au/product-reviews",config:A},{site:"https://www.nine.com.au/property",config:A},{site:"https://www.nine.com.au/entertainment",config:A},{site:"https://staging.nine.com.au/sport",config:g},{site:"https://staging.nine.com.au/product-reviews",config:A},{site:"https://staging.nine.com.au/property",config:A},{site:"https://staging.nine.com.au/entertainment",config:A},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:s},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:s},{site:"https://preview.nine.com.au/",config:s},{site:"https://www.nine",config:s},{site:"https://staging.nine",config:s},{site:"https://entertainment",config:l},{site:"https://celebrity",config:l},{site:"https://homes",config:l},{site:"https://travel",config:l},{site:"https://honey",config:l},{site:"https://style",config:l},{site:"https://coach",config:l},{site:"https://kitchen",config:l},{site:"https://finance",config:l},{site:"https://wwos",config:x},{site:"https://staging.wwos",config:g},{site:"https://www.9news",config:q},{site:"https://staging.9news",config:q},{site:"https://www.yourtv",config:l},{site:"https://staging.yourtv",config:l},{site:"https://9now",config:A},{site:"https://creative-preview-an.com",config:l}],C=()=>{const o=window.document.getElementById("nineContent");o&&(o.style.backgroundColor=a.siteBackgroundColor),L(),P(),y.addEventListener("scroll",T),n=setTimeout(T,50)},N=()=>{let o=null;return o=p.querySelector('div[id*="billboard"][id*="above"]'),o},M=()=>{const o=y.location.href;for(let d=0;d<B.length;d+=1)if(o.indexOf(B[d].site)>=0)return B[d].config},P=()=>{if(!i)return;const o=i.style;o.width="100%",o.height="1000px",o.position="fixed",o.left="50%",o.transform="translate(-50%, 0)"},L=()=>{if(!E)return;const o=E.style;E.className="",o.minHeight="250px",o.marginTop=a.adNodeMarginTop+"px",o.marginBottom=a.adNodeMarginBottom+"px",o.position="static",o.display="block",a.zIndex&&a.zIndex()},T=()=>{const o=y.scrollY,d=i.style,v=document.getElementById("siteContent")?document.getElementById("siteContent").style:{};o>=0&&o<=u?(d.transform=`translate(-50%, ${-o}px)`,v.transform="translateY(0)"):o>u&&o<=m?(d.transform=`translate(-50%, ${-u}px)`,v.transform=`translateY(${u-o}px)`):o>m&&(d.transform=`translate(-50%, ${-u}px)`,v.transform="translateY(-250px)")},E=N(),a=M();if(!a)return()=>{};let n=null;const u=-a.responsiveScroll+b,m=u+250;return C(),()=>{y.removeEventListener("scroll",T),n&&(clearTimeout(n),n=null)}},z=b=>{const i=window.frameElement?window.frameElement:null;if(!i)return()=>{};const y=window.parent;if(!y||y===window)return()=>{};let p=null;try{p=y.document,y.location.href}catch{return()=>{}}const l=document.getElementById("nineMasthead"),A=l?l.style:{};let s;const g={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:722,yPosHalfpage:72,stickyMargin:{offset:160,isSticky:!0},maskOffset:298,zIndex:function(){const e=window.parent.document,c=(f,k)=>f.forEach(w=>k.forEach(([I,D])=>w.style[I]=D));e.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),e.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),e.querySelector("article")?.setAttribute("style","position:relative"),e.querySelector("#article")?.setAttribute("style","position:relative"),e.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),e.querySelector("#Index")?.setAttribute("style","position:relative"),e.querySelector(".show")?.setAttribute("style","position:relative"),e.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style","position:relative"),c(e.querySelectorAll(".column"),[["position","relative"]]),c(e.querySelectorAll(".advert"),[["position","relative"]]),c(e.querySelectorAll("blockquote"),[["zIndex","1"]]),e.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),e.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none")}},x={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:32,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector('div[class*="video-index__MyContainer"]')?248:298,zIndex:function(){const e=window.parent.document,c=(f,k)=>f.forEach(w=>k.forEach(([I,D])=>w.style[I]=D));e.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),e.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),e.querySelector("article")?.setAttribute("style","position:relative"),e.querySelector("#article")?.setAttribute("style","position:relative"),e.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),e.querySelector("#Index")?.setAttribute("style","position:relative"),e.querySelector(".show")?.setAttribute("style","position:relative"),c(e.querySelectorAll(".column"),[["position","relative"]]),c(e.querySelectorAll(".advert"),[["position","relative"]]),c(e.querySelectorAll("blockquote"),[["zIndex","1"]]),e.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style","position:relative"),e.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style","max-width:1190px;margin-top:24px"),e.querySelector('div[class*="MyContainer"]')?.setAttribute("style","max-width:1190px;margin-top:24px")}},q={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:-13,responsiveScroll:-120,xPosHalfpage:722,yPosHalfpage:32,stickyMargin:{offset:166,isSticky:!0},maskOffset:304,zIndex:function(){const e=window.parent.document;if(e.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style","position:relative"),e.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style","position:relative"),e.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style","position:relative"),e.querySelector("small")?.setAttribute("style","position:inherit"),e.querySelector('div[id*="tablet"][id*="takeover"]')){let f=e.createElement("style");f.innerHTML=`
|
|
14
14
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
15
15
|
position: static;
|
|
16
16
|
}
|
|
17
|
-
`,e.head.appendChild(f)}}},
|
|
17
|
+
`,e.head.appendChild(f)}}},B={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:32,stickyMargin:{offset:160,isSticky:!0},maskOffset:312,zIndex:function(){const e=window.parent.document,f=e.querySelector("footer").previousElementSibling;if(f&&f.tagName.toLowerCase()==="div"&&(f.style.position="relative"),e.querySelector('div[id*="tablet"][id*="takeover"]')){let w=e.createElement("style");w.innerHTML=`
|
|
18
18
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
19
19
|
position: static;
|
|
20
20
|
}
|
|
21
|
-
`,e.head.appendChild(w)}}},
|
|
21
|
+
`,e.head.appendChild(w)}}},C={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-25,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:32,stickyMargin:{offset:175,isSticky:!0},maskOffset:274,zIndex:function(){const e=window.parent.document,c=(k,w)=>k.forEach(I=>w.forEach(([D,$])=>I.style[D]=$));if(e.querySelector(".container--padded")?.setAttribute("style","position:relative"),c(e.querySelectorAll(".advert"),[["position","relative"]]),e.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),e.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),e.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),e.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none"),e.querySelector(".score-strip")?.setAttribute("style","display:none"),e.querySelector(".feed-header__breadcrumbs")?.setAttribute("style","display:none"),e.querySelector(".layout.container")?.setAttribute("style","padding:0"),e.querySelector(".empty-div")?.setAttribute("style","display:none"),e.querySelector('div[id*="tablet"][id*="takeover"]')){let k=e.createElement("style");k.innerHTML=`
|
|
22
22
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
23
23
|
position: static;
|
|
24
24
|
}
|
|
25
|
-
`,e.head.appendChild(k)}}},E={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector('div[class*="VideoIndexComponent"]')?324:292,zIndex:function(){const e=window.parent.document;e.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),e.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),e.querySelector(".content")?.setAttribute("style","padding-top:32px"),e.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),e.querySelector(".footer-ad")?.setAttribute("style","position:relative"),e.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");const c=e.querySelector('[class*="VideoIndexComponent"]');c&&(e.querySelector(".breadcrumbs")?.setAttribute("style","display:none"),c.style.maxWidth="1190px",c.style.margin="auto",c.style.position="relative")}},M=[{site:"https://www.nine.com.au/sport",config:C},{site:"https://www.nine.com.au/product-reviews",config:x},{site:"https://www.nine.com.au/property",config:x},{site:"https://www.nine.com.au/entertainment",config:x},{site:"https://staging.nine.com.au/sport",config:C},{site:"https://staging.nine.com.au/product-reviews",config:x},{site:"https://staging.nine.com.au/property",config:x},{site:"https://staging.nine.com.au/entertainment",config:x},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:q},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:q},{site:"https://preview.nine.com.au/",config:q},{site:"https://www.nine",config:q},{site:"https://staging.nine",config:q},{site:"https://entertainment",config:u},{site:"https://celebrity",config:u},{site:"https://homes",config:u},{site:"https://travel",config:u},{site:"https://honey",config:u},{site:"https://style",config:u},{site:"https://coach",config:u},{site:"https://kitchen",config:u},{site:"https://finance",config:u},{site:"https://wwos",config:N},{site:"https://staging.wwos",config:C},{site:"https://www.9news",config:E},{site:"https://staging.9news",config:E},{site:"https://www.yourtv",config:u},{site:"https://staging.yourtv",config:u},{site:"https://9now",config:x},{site:"https://creative-preview-an.com",config:u}],L=()=>{const e=window.document.getElementById("nineContent");e&&(e.style.backgroundColor=t.siteBackgroundColor),l&&(A.setProperty("--masthead-height","250px"),A.height="var(--masthead-height)"),n(),a(),T(),v(),y.addEventListener("scroll",d,{passive:!0}),r=setTimeout(d,50)},D=()=>{let e=null;return e=p.querySelector('div[id*="billboard"][id*="above"]'),e},T=()=>{let e=null;if(!window.parent)return e;if(e=p.querySelector('div[id*="halfpage"][id*="above"]'),!e)return;let c=e;for(let f=0;f<3;f++)if(c=c.parentNode,c&&getComputedStyle(c).position==="sticky"){c.setAttribute("style",`top: ${t.stickyMargin.offset}px`);break}},B=()=>{const e=y.location.href;for(let c=0;c<M.length;c+=1)if(e.indexOf(M[c].site)>=0)return M[c].config},a=()=>{if(!i)return;const e=i.style;e.width="100%",e.height="1000px",e.position="fixed",e.left="50%",e.setProperty("--transform-y","0px"),e.transform="translate3d(-50%, var(--transform-y), 0)"},n=()=>{if(!m)return;const e=m.style;m.className="",e.minHeight="250px",e.marginTop=t.adNodeMarginTop+"px",e.marginBottom=t.adNodeMarginBottom+"px",e.position="static",e.display="block",t.zIndex&&t.zIndex()},v=()=>{s=p.querySelector('div[data-contentunit-id="stan"]')?.parentNode||p.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode||p.querySelector('div[class*="__MyContainer"]')||p.querySelector('div[class*="__ArticleContainer"]')||p.querySelector('div[class*="__VideoIndexComponent"]')||p.querySelector("div.container.layout")||p.querySelector("main.container.layout"),s&&(s.style.willChange="clip-path",s.style.transition="none",s.style.webkitBackfaceVisibility="hidden",s.style.backfaceVisibility="hidden",s.style.transform="translate3d(0,0,0)",s.style.backgroundColor=t.siteBackgroundColor,s.style.setProperty("--mask-inset","0px"),s.style.clipPath="inset(var(--mask-inset, 0px) 0 0 0)")};let g=0,o=0;const d=()=>{const e=y.scrollY,c=e>g,f=e>S?e-t.maskOffset:0,k=Math.abs(f-o);if(s)if(c&&f>o)if(k>100){const w=Math.max(0,f-100);s.style.transition="none",s.style.setProperty("--mask-inset",`${w}px`),s.offsetHeight,s.style.transition="clip-path 0.3s ease-out",s.style.setProperty("--mask-inset",`${f}px`)}else s.style.transition="clip-path 0.3s ease-out",s.style.setProperty("--mask-inset",`${f}px`);else s.style.transition="none",s.style.setProperty("--mask-inset",`${f}px`);g=e,o=f,e>S?(i.style.setProperty("--transform-y",`${-h}px`),A.setProperty("--masthead-height","100px"),window.CollantOn||window.goCollant()):e>h&&e<=S?(i.style.setProperty("--transform-y",`${-h}px`),A.setProperty("--masthead-height",`${250+h-e}px`),window.CollantOn&&window.goBillboard()):e>=0&&e<=h&&(i.style.setProperty("--transform-y",`${-e}px`),A.setProperty("--masthead-height","250px"),window.CollantOn&&window.goBillboard())},m=D(),t=B();if(!t)return()=>{};let r=null;const h=-t.responsiveScroll+b,S=h+150;return L(),()=>{y.removeEventListener("scroll",d),r&&(clearTimeout(r),r=null)}},$=(b,i,y)=>{const p=window.frameElement?window.frameElement:null;if(!p)return()=>{};const l=window.parent;if(!l||l===window)return()=>{};let A=null;try{A=l.document,l.location.href}catch{return()=>{}}const s={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"250px",logoSmallTransform:"translateX(0px)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},u={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style","max-width:1190px;margin-top:-24px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},x={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style","position:relative"),t.querySelector('section[class^="WatchNow__Container"]')?.setAttribute("style","margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"),t.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style","max-width:1190px;margin-top:0px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},q={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style","position:relative"),t.querySelector(".container--ads")?.setAttribute("style","min-height:0"),t.getElementById("mastheadAnchorToggle")?.setAttribute("style","display:none"),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("iframe"),[["position","relative"]]),t.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style","position:relative"),t.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style","position:relative"),r(t.querySelectorAll("small"),[["position","relative"]]),t.querySelector("small")?.setAttribute("style","position:inherit"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},C={siteBackgroundColor:"#ffffff",logoTop:"-148px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},N={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"invert(1)",zIndex:function(){const t=window.parent.document;t.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),t.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),t.querySelector(".content")?.setAttribute("style","padding-top:32px"),t.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),t.querySelector(".footer-ad")?.setAttribute("style","position:relative"),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},E=[{site:"https://www.nine.com.au/sport",config:s},{site:"https://www.nine.com.au/product-reviews",config:x},{site:"https://www.nine.com.au/property",config:x},{site:"https://www.nine.com.au/entertainment",config:x},{site:"https://staging.nine.com.au/sport",config:s},{site:"https://staging.nine.com.au/product-reviews",config:x},{site:"https://staging.nine.com.au/property",config:x},{site:"https://staging.nine.com.au/entertainment",config:x},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:q},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:q},{site:"https://preview.nine.com.au/",config:q},{site:"https://www.nine",config:q},{site:"https://staging.nine",config:q},{site:"https://entertainment",config:u},{site:"https://celebrity",config:u},{site:"https://homes",config:u},{site:"https://travel",config:u},{site:"https://honey",config:u},{site:"https://style",config:u},{site:"https://coach",config:u},{site:"https://kitchen",config:u},{site:"https://finance",config:u},{site:"https://wwos",config:C},{site:"https://staging.wwos",config:C},{site:"https://www.9news",config:N},{site:"https://staging.9news",config:N},{site:"https://www.yourtv",config:u},{site:"https://staging.yourtv",config:u},{site:"https://9now",config:x},{site:"https://creative-preview-an.com",config:u}],M=()=>{const t=window.document.getElementById("logo-small");t&&(t.style.left=g.logoSmallLeft,t.style.transform=g.logoSmallTransform,t.style.filter=g.logoSmallFilter),B(),T(),l.addEventListener("scroll",n),o=setTimeout(n,50)},L=()=>{let t=null;return t=A.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'),t},D=()=>{const t=l.location.href;for(let r=0;r<E.length;r+=1)if(t.indexOf(E[r].site)>=0)return E[r].config},T=()=>{if(!p)return;const t=p.style;t.width="100%",t.height=`${i}px`,t.position="relative"},B=()=>{if(!v)return;const t=v.style;t.maxHeight=`${i}px`,t.minHeight=`${i}px`,t.marginTop="0px",t.marginBottom="0px",t.position="absolute",t.width="1900px",t.top=g.logoTop,t.left=g.logoLeft,t.transform=g.logoTransform,t.zIndex="10000",t.pointerEvents="none",g.zIndex&&g.zIndex()},a=t=>{if(!v)return;const r=v.style;t==="big"&&!window.bigActive?(r.maxHeight=`${i}px`,r.minHeight=`${i}px`,r.position="absolute",r.top=g.logoTop,r.zIndex="10000",window.loadBig()):t==="small"&&!window.smallActive&&(r.maxHeight=`${y}px`,r.minHeight=`${y}px`,r.position="fixed",r.top="0px",r.zIndex="100000",window.loadSmall())},n=()=>{const t=l.scrollY;p.style,t>=0&&t<=d?a("big"):t>d&&(t>m?a("small"):a("big"),m=t<=0?0:t)},v=L(),g=D();if(!g)return()=>{};let o=null;const d=b;let m=0;return M(),()=>{l.removeEventListener("scroll",n),o&&(clearTimeout(o),o=null)}},O=((b,i=50)=>`linear(${Array.from({length:i+1},(p,l)=>b(l/i)).map(p=>+p.toFixed(4)).join(", ")})`)(b=>{if(b===0||b===1)return b;const i=2*Math.PI/3;return Math.pow(2,-10*b)*Math.sin((b*10-.75)*i)+1}),V=(b={})=>{const i={adScrollHeight:"300vh",bandHeight:24,bandBg:"#222",bandColor:"#fff",bandFontSize:"10px",bandFontFamily:"Arial, Helvetica, sans-serif",bandLetterSpacing:"1px",labelTop:"Advertisement",labelBottomResume:"Scroll to continue",labelBottomMid:"Keep scrolling",labelBottomLate:"Almost there",labelBottomNow:"Content now ↓",progressBarColor:"rgba(255,255,255,0.35)",zIndexTop:9,zIndexBottom:8,snapPx:50,snapOverlap:2,stretchOverlap:4,snapDuration:.9,snapEase:O,onEnter:null,onExit:null,onProgress:null,thresholds:[],...b},y=window.frameElement?window.frameElement:null;if(!y)return()=>{};const p=window.parent;if(!p||p===window)return()=>{};let l=null;try{l=p.document,p.location.href}catch{return()=>{}}const s=(()=>{const a=l.querySelector("#adspot-mobile-mobile-3-above");if(a)return a;let n=y.parentElement;for(;n&&n!==l.body;){if(n.id&&n.id.includes("adspot"))return n;n=n.parentElement}return y.parentElement})();if(!s)return()=>{};const u=s.getAttribute("style"),x=y.getAttribute("style"),q={width:"100vw",marginLeft:"calc(50% - 50vw)",height:i.bandHeight+"px",backgroundColor:i.bandBg,color:i.bandColor,fontSize:i.bandFontSize,fontFamily:i.bandFontFamily,textTransform:"uppercase",letterSpacing:i.bandLetterSpacing,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"};(()=>{const a=s.style;a.height=i.adScrollHeight,a.position="relative",a.clipPath=`inset(-${i.bandHeight}px 0 0 0)`,a.overflow="visible",a.width="100vw",a.maxWidth="100vw",a.marginLeft="calc(50% - 50vw)",a.marginRight="0",a.marginTop="0",a.marginBottom="0",a.padding="0",a.className="";const n=y.style;n.position="fixed",n.top="0",n.left="0",n.width="100vw",n.height="100vh",n.maxWidth="100vw",n.margin="0",n.padding="0",n.border="none",n.zIndex="1";const v=l.createElement("div");v.id="interscroller-top-band",v.textContent=i.labelTop,Object.assign(v.style,q,{position:"sticky",bottom:"0",zIndex:i.zIndexTop,transformOrigin:"top center"});const g=s.previousElementSibling;g?g.appendChild(v):s.parentElement.insertBefore(v,s);const o=l.createElement("div");o.id="interscroller-bottom-band",Object.assign(o.style,q,{position:"relative",top:"0",zIndex:i.zIndexBottom,display:"none",overflow:"hidden"});const d=l.createElement("span");if(d.id="interscroller-bottom-label",d.textContent=i.labelBottomResume,d.style.cssText="position:relative;z-index:1;pointer-events:none;",o.appendChild(d),i.progressBarColor){const m=l.createElement("span");m.id="interscroller-bottom-progress",m.style.cssText=["position:absolute","inset:0","width:0%",`background:${i.progressBarColor}`,"transition:none","z-index:0","pointer-events:none"].join(";"),o.appendChild(m)}s.after(o)})();const N=i.bandHeight,E=i.snapPx;let M=!1,L=!1,D=!1;const T=(i.thresholds||[]).map(()=>!1),B=()=>{const a=l.querySelector("#interscroller-top-band"),n=l.querySelector("#interscroller-bottom-band");if(!n)return;const v=s.getBoundingClientRect(),g=p.innerHeight,o=v.top<=g,d=v.bottom<=g-N,m=s.offsetHeight,t=Math.min(1,Math.max(0,(g-v.top)/(m+g))),r=Math.min(1,Math.max(0,(g-v.top)/(m+N))),h=Math.min(1,Math.max(0,(g-v.top)/m)),S=Math.min(v.bottom,g)-Math.max(v.top-N,0),e=Math.min(1,Math.max(0,S/g)),c=Math.max(0,Math.round(v.bottom-g));if(!L&&o&&i.onEnter&&i.onEnter(),!D&&d&&i.onExit&&i.onExit(),L=o,D=d,i.onProgress&&i.onProgress({scrollProgress:t,adExposure:h,viewportCoverage:e,pxRemaining:c}),(i.thresholds||[]).forEach((w,I)=>{const P=T[I],R=t>=w.at;!P&&R?(T[I]=!0,w.onEnter&&w.onEnter(t)):P&&!R&&(T[I]=!1,w.onLeave&&w.onLeave(t))}),a&&o&&!d){const w=g-v.top;if(!M&&w<=E-i.snapOverlap){const P=1+(Math.max(0,w/E)*E+i.stretchOverlap)/N;a.style.transition="none",a.style.transform=`scaleY(${P})`}else!M&&w>E-i.snapOverlap&&(M=!0,a.style.transition=`transform ${i.snapDuration}s ${i.snapEase}`,a.style.transform="scaleY(1)")}else a&&!o&&(M=!1,a.style.transition="none",a.style.transform="scaleY(1)");const f=l.querySelector("#interscroller-bottom-label"),k=l.querySelector("#interscroller-bottom-progress");if(d)n.style.position="sticky",n.style.top="0",n.style.bottom="",n.style.left="",n.style.marginLeft="calc(50% - 50vw)",n.style.width="100vw",n.style.display="flex",f&&(f.textContent=i.labelBottomNow),k&&(k.style.width="100%");else if(o){f&&(f.textContent=c>0?r<.2?i.labelBottomResume:r<.75?i.labelBottomMid:i.labelBottomLate:i.labelBottomNow),k&&(k.style.width=`${Math.round(r*100)}%`),n.style.position="fixed";const w=p.visualViewport?Math.round(p.innerHeight-(p.visualViewport.offsetTop+p.visualViewport.height)):0;n.style.bottom=`${w}px`,n.style.top="",n.style.left="0",n.style.marginLeft="0",n.style.width="100vw",n.style.display="flex"}else n.style.display="none"};return B(),p.addEventListener("scroll",B,{passive:!0}),p.visualViewport?.addEventListener("resize",B,{passive:!0}),()=>{p.removeEventListener("scroll",B),p.visualViewport?.removeEventListener("resize",B);const a=l.querySelector("#interscroller-top-band"),n=l.querySelector("#interscroller-bottom-band");a&&a.remove(),n&&n.remove(),u?s.setAttribute("style",u):s.removeAttribute("style"),x?y.setAttribute("style",x):y.removeAttribute("style")}};let _=()=>{};function F({adFormat:b="",stickyOffset:i=0,logoPosX:y=0,logoHeight:p=0,logoSmallHeight:l=0,...A}={}){typeof _=="function"&&_();let s=()=>{};return b==="fireplace"?s=H(i):b==="fireplace-collant"?s=z(i):b==="logomorph"?s=$(y,p,l):b==="interscroller"?s=V(A):console.warn("[powered-ad-config] Unknown ad format:",b),_=typeof s=="function"?s:()=>{},_}return F}));
|
|
25
|
+
`,e.head.appendChild(k)}}},N={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector('div[class*="VideoIndexComponent"]')?324:292,zIndex:function(){const e=window.parent.document;e.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),e.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),e.querySelector(".content")?.setAttribute("style","padding-top:32px"),e.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),e.querySelector(".footer-ad")?.setAttribute("style","position:relative"),e.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");const c=e.querySelector('[class*="VideoIndexComponent"]');c&&(e.querySelector(".breadcrumbs")?.setAttribute("style","display:none"),c.style.maxWidth="1190px",c.style.margin="auto",c.style.position="relative")}},M=[{site:"https://www.nine.com.au/sport",config:B},{site:"https://www.nine.com.au/product-reviews",config:x},{site:"https://www.nine.com.au/property",config:x},{site:"https://www.nine.com.au/entertainment",config:x},{site:"https://staging.nine.com.au/sport",config:B},{site:"https://staging.nine.com.au/product-reviews",config:x},{site:"https://staging.nine.com.au/property",config:x},{site:"https://staging.nine.com.au/entertainment",config:x},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:q},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:q},{site:"https://preview.nine.com.au/",config:q},{site:"https://www.nine",config:q},{site:"https://staging.nine",config:q},{site:"https://entertainment",config:g},{site:"https://celebrity",config:g},{site:"https://homes",config:g},{site:"https://travel",config:g},{site:"https://honey",config:g},{site:"https://style",config:g},{site:"https://coach",config:g},{site:"https://kitchen",config:g},{site:"https://finance",config:g},{site:"https://wwos",config:C},{site:"https://staging.wwos",config:B},{site:"https://www.9news",config:N},{site:"https://staging.9news",config:N},{site:"https://www.yourtv",config:g},{site:"https://staging.yourtv",config:g},{site:"https://9now",config:x},{site:"https://creative-preview-an.com",config:g}],P=()=>{const e=window.document.getElementById("nineContent");e&&(e.style.backgroundColor=t.siteBackgroundColor),l&&(A.setProperty("--masthead-height","250px"),A.height="var(--masthead-height)"),n(),a(),T(),u(),y.addEventListener("scroll",d,{passive:!0}),r=setTimeout(d,50)},L=()=>{let e=null;return e=p.querySelector('div[id*="billboard"][id*="above"]'),e},T=()=>{let e=null;if(!window.parent)return e;if(e=p.querySelector('div[id*="halfpage"][id*="above"]'),!e)return;let c=e;for(let f=0;f<3;f++)if(c=c.parentNode,c&&getComputedStyle(c).position==="sticky"){c.setAttribute("style",`top: ${t.stickyMargin.offset}px`);break}},E=()=>{const e=y.location.href;for(let c=0;c<M.length;c+=1)if(e.indexOf(M[c].site)>=0)return M[c].config},a=()=>{if(!i)return;const e=i.style;e.width="100%",e.height="1000px",e.position="fixed",e.left="50%",e.setProperty("--transform-y","0px"),e.transform="translate3d(-50%, var(--transform-y), 0)"},n=()=>{if(!v)return;const e=v.style;v.className="",e.minHeight="250px",e.marginTop=t.adNodeMarginTop+"px",e.marginBottom=t.adNodeMarginBottom+"px",e.position="static",e.display="block",t.zIndex&&t.zIndex()},u=()=>{s=p.querySelector('div[data-contentunit-id="stan"]')?.parentNode||p.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode||p.querySelector('div[class*="__MyContainer"]')||p.querySelector('div[class*="__ArticleContainer"]')||p.querySelector('div[class*="__VideoIndexComponent"]')||p.querySelector("div.container.layout")||p.querySelector("main.container.layout"),s&&(s.style.willChange="clip-path",s.style.transition="none",s.style.webkitBackfaceVisibility="hidden",s.style.backfaceVisibility="hidden",s.style.transform="translate3d(0,0,0)",s.style.backgroundColor=t.siteBackgroundColor,s.style.setProperty("--mask-inset","0px"),s.style.clipPath="inset(var(--mask-inset, 0px) 0 0 0)")};let m=0,o=0;const d=()=>{const e=y.scrollY,c=e>m,f=e>S?e-t.maskOffset:0,k=Math.abs(f-o);if(s)if(c&&f>o)if(k>100){const w=Math.max(0,f-100);s.style.transition="none",s.style.setProperty("--mask-inset",`${w}px`),s.offsetHeight,s.style.transition="clip-path 0.3s ease-out",s.style.setProperty("--mask-inset",`${f}px`)}else s.style.transition="clip-path 0.3s ease-out",s.style.setProperty("--mask-inset",`${f}px`);else s.style.transition="none",s.style.setProperty("--mask-inset",`${f}px`);m=e,o=f,e>S?(i.style.setProperty("--transform-y",`${-h}px`),A.setProperty("--masthead-height","100px"),window.CollantOn||window.goCollant()):e>h&&e<=S?(i.style.setProperty("--transform-y",`${-h}px`),A.setProperty("--masthead-height",`${250+h-e}px`),window.CollantOn&&window.goBillboard()):e>=0&&e<=h&&(i.style.setProperty("--transform-y",`${-e}px`),A.setProperty("--masthead-height","250px"),window.CollantOn&&window.goBillboard())},v=L(),t=E();if(!t)return()=>{};let r=null;const h=-t.responsiveScroll+b,S=h+150;return P(),()=>{y.removeEventListener("scroll",d),r&&(clearTimeout(r),r=null)}},O=(b,i,y)=>{const p=window.frameElement?window.frameElement:null;if(!p)return()=>{};const l=window.parent;if(!l||l===window)return()=>{};let A=null;try{A=l.document,l.location.href}catch{return()=>{}}const s={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"250px",logoSmallTransform:"translateX(0px)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},g={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style","max-width:1190px;margin-top:-24px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},x={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style","position:relative"),t.querySelector('section[class^="WatchNow__Container"]')?.setAttribute("style","margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"),t.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style","max-width:1190px;margin-top:0px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},q={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style","position:relative"),t.querySelector(".container--ads")?.setAttribute("style","min-height:0"),t.getElementById("mastheadAnchorToggle")?.setAttribute("style","display:none"),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("iframe"),[["position","relative"]]),t.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style","position:relative"),t.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style","position:relative"),r(t.querySelectorAll("small"),[["position","relative"]]),t.querySelector("small")?.setAttribute("style","position:inherit"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},B={siteBackgroundColor:"#ffffff",logoTop:"-148px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(h,S)=>h.forEach(e=>S.forEach(([c,f])=>e.style[c]=f));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},C={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"invert(1)",zIndex:function(){const t=window.parent.document;t.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),t.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),t.querySelector(".content")?.setAttribute("style","padding-top:32px"),t.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),t.querySelector(".footer-ad")?.setAttribute("style","position:relative"),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},N=[{site:"https://www.nine.com.au/sport",config:s},{site:"https://www.nine.com.au/product-reviews",config:x},{site:"https://www.nine.com.au/property",config:x},{site:"https://www.nine.com.au/entertainment",config:x},{site:"https://staging.nine.com.au/sport",config:s},{site:"https://staging.nine.com.au/product-reviews",config:x},{site:"https://staging.nine.com.au/property",config:x},{site:"https://staging.nine.com.au/entertainment",config:x},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:q},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:q},{site:"https://preview.nine.com.au/",config:q},{site:"https://www.nine",config:q},{site:"https://staging.nine",config:q},{site:"https://entertainment",config:g},{site:"https://celebrity",config:g},{site:"https://homes",config:g},{site:"https://travel",config:g},{site:"https://honey",config:g},{site:"https://style",config:g},{site:"https://coach",config:g},{site:"https://kitchen",config:g},{site:"https://finance",config:g},{site:"https://wwos",config:B},{site:"https://staging.wwos",config:B},{site:"https://www.9news",config:C},{site:"https://staging.9news",config:C},{site:"https://www.yourtv",config:g},{site:"https://staging.yourtv",config:g},{site:"https://9now",config:x},{site:"https://creative-preview-an.com",config:g}],M=()=>{const t=window.document.getElementById("logo-small");t&&(t.style.left=m.logoSmallLeft,t.style.transform=m.logoSmallTransform,t.style.filter=m.logoSmallFilter),E(),T(),l.addEventListener("scroll",n),o=setTimeout(n,50)},P=()=>{let t=null;return t=A.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'),t},L=()=>{const t=l.location.href;for(let r=0;r<N.length;r+=1)if(t.indexOf(N[r].site)>=0)return N[r].config},T=()=>{if(!p)return;const t=p.style;t.width="100%",t.height=`${i}px`,t.position="relative"},E=()=>{if(!u)return;const t=u.style;t.maxHeight=`${i}px`,t.minHeight=`${i}px`,t.marginTop="0px",t.marginBottom="0px",t.position="absolute",t.width="1900px",t.top=m.logoTop,t.left=m.logoLeft,t.transform=m.logoTransform,t.zIndex="10000",t.pointerEvents="none",m.zIndex&&m.zIndex()},a=t=>{if(!u)return;const r=u.style;t==="big"&&!window.bigActive?(r.maxHeight=`${i}px`,r.minHeight=`${i}px`,r.position="absolute",r.top=m.logoTop,r.zIndex="10000",window.loadBig()):t==="small"&&!window.smallActive&&(r.maxHeight=`${y}px`,r.minHeight=`${y}px`,r.position="fixed",r.top="0px",r.zIndex="100000",window.loadSmall())},n=()=>{const t=l.scrollY;p.style,t>=0&&t<=d?a("big"):t>d&&(t>v?a("small"):a("big"),v=t<=0?0:t)},u=P(),m=L();if(!m)return()=>{};let o=null;const d=b;let v=0;return M(),()=>{l.removeEventListener("scroll",n),o&&(clearTimeout(o),o=null)}},R=((b,i=50)=>`linear(${Array.from({length:i+1},(p,l)=>b(l/i)).map(p=>+p.toFixed(4)).join(", ")})`)(b=>{if(b===0||b===1)return b;const i=2*Math.PI/3;return Math.pow(2,-10*b)*Math.sin((b*10-.75)*i)+1}),V=(b={})=>{const i={adScrollHeight:"300vh",revealMode:"clip",bandHeight:24,bandBg:"#222",bandColor:"#fff",bandFontSize:"10px",bandFontFamily:"Arial, Helvetica, sans-serif",bandLetterSpacing:"1px",labelTop:"Advertisement4",labelBottomResume:"Scroll to continue",labelBottomMid:"Keep scrolling",labelBottomLate:"Almost there",labelBottomNow:"Content now ↓",progressBarColor:"rgba(255,255,255,0.35)",zIndexTop:9,zIndexBottom:8,snapPx:50,snapOverlap:2,stretchOverlap:4,snapDuration:.9,snapEase:R,onEnter:null,onExit:null,onProgress:null,thresholds:[],...b},y=window.frameElement?window.frameElement:null;if(!y)return()=>{};const p=window.parent;if(!p||p===window)return()=>{};let l=null;try{l=p.document,p.location.href}catch{return()=>{}}const s=(()=>{const a=l.querySelector("#adspot-mobile-mobile-3-above");if(a)return a;let n=y.parentElement;for(;n&&n!==l.body;){if(n.id&&n.id.includes("adspot"))return n;n=n.parentElement}return y.parentElement})();if(!s)return()=>{};const g=s.getAttribute("style"),x=y.getAttribute("style"),q={width:"100vw",marginLeft:"calc(50% - 50vw)",height:i.bandHeight+"px",backgroundColor:i.bandBg,color:i.bandColor,fontSize:i.bandFontSize,fontFamily:i.bandFontFamily,textTransform:"uppercase",letterSpacing:i.bandLetterSpacing,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"};(()=>{const a=s.style;a.height=i.adScrollHeight,a.position="relative",a.clipPath=`inset(-${i.bandHeight}px 0 0 0)`,a.overflow="visible",a.width="100vw",a.maxWidth="100vw",a.marginLeft="calc(50% - 50vw)",a.marginRight="0",a.marginTop="0",a.marginBottom="0",a.padding="0",a.className="";const n=y.style;n.position="fixed",n.top="0",n.left="0",n.width="100vw",n.height="100vh",n.maxWidth="100vw",n.margin="0",n.padding="0",n.border="none",n.zIndex="1";const u=l.createElement("div");u.id="interscroller-top-band",u.textContent=i.labelTop,Object.assign(u.style,q,{position:"sticky",bottom:"0",...i.revealMode==="slide"&&{marginBottom:`-${i.bandHeight}px`},zIndex:i.zIndexTop,transformOrigin:"top center"});const m=s.previousElementSibling;m?m.appendChild(u):s.parentElement.insertBefore(u,s);const o=l.createElement("div");o.id="interscroller-bottom-band",Object.assign(o.style,q,{position:"relative",top:"0",zIndex:i.zIndexBottom,display:"none",overflow:"hidden"});const d=l.createElement("span");if(d.id="interscroller-bottom-label",d.textContent=i.labelBottomResume,d.style.cssText="position:relative;z-index:1;pointer-events:none;",o.appendChild(d),i.progressBarColor){const v=l.createElement("span");v.id="interscroller-bottom-progress",v.style.cssText=["position:absolute","inset:0","width:0%",`background:${i.progressBarColor}`,"transition:none","z-index:0","pointer-events:none"].join(";"),o.appendChild(v)}s.after(o)})();const C=i.bandHeight,N=i.snapPx;let M=!1,P=!1,L=!1;const T=(i.thresholds||[]).map(()=>!1),E=()=>{const a=l.querySelector("#interscroller-top-band"),n=l.querySelector("#interscroller-bottom-band");if(!n)return;const u=s.getBoundingClientRect(),m=p.innerHeight,o=u.top<=m,d=u.bottom<=m-C;i.revealMode==="slide"&&(y.style.top=o&&u.top>0?`${u.top}px`:"0");const v=s.offsetHeight,t=Math.min(1,Math.max(0,(m-u.top)/(v+m))),r=Math.min(1,Math.max(0,(m-u.top)/(v+C))),h=Math.min(1,Math.max(0,(m-u.top)/v)),S=Math.min(u.bottom,m)-Math.max(u.top-C,0),e=Math.min(1,Math.max(0,S/m)),c=Math.max(0,Math.round(u.bottom-m));if(!P&&o&&i.onEnter&&i.onEnter(),!L&&d&&i.onExit&&i.onExit(),P=o,L=d,i.onProgress&&i.onProgress({scrollProgress:t,adExposure:h,viewportCoverage:e,pxRemaining:c}),(i.thresholds||[]).forEach((w,I)=>{const D=T[I],$=t>=w.at;!D&&$?(T[I]=!0,w.onEnter&&w.onEnter(t)):D&&!$&&(T[I]=!1,w.onLeave&&w.onLeave(t))}),a&&u.top<=m+i.stretchOverlap&&!d){const w=m-u.top;if(!M&&w<=N-i.snapOverlap){const I=1+Math.max(0,w+i.stretchOverlap)/C;a.style.transition="none",a.style.transform=`scaleY(${I})`}else!M&&w>N-i.snapOverlap&&(M=!0,a.style.transition=`transform ${i.snapDuration}s ${i.snapEase}`,a.style.transform="scaleY(1)")}else a&&u.top>m+i.stretchOverlap&&(M=!1,a.style.transition="none",a.style.transform="scaleY(1)");const f=l.querySelector("#interscroller-bottom-label"),k=l.querySelector("#interscroller-bottom-progress");if(d)n.style.position="sticky",n.style.top="0",n.style.bottom="",n.style.left="",n.style.marginLeft="calc(50% - 50vw)",n.style.width="100vw",n.style.display="flex",f&&(f.textContent=i.labelBottomNow),k&&(k.style.width="100%");else if(o){f&&(f.textContent=c>0?r<.2?i.labelBottomResume:r<.75?i.labelBottomMid:i.labelBottomLate:i.labelBottomNow),k&&(k.style.width=`${Math.round(r*100)}%`),n.style.position="fixed";const w=p.visualViewport?Math.round(p.innerHeight-(p.visualViewport.offsetTop+p.visualViewport.height)):0;n.style.bottom=`${w}px`,n.style.top="",n.style.left="0",n.style.marginLeft="0",n.style.width="100vw",n.style.display="flex"}else n.style.display="none"};return E(),p.addEventListener("scroll",E,{passive:!0}),p.visualViewport?.addEventListener("resize",E,{passive:!0}),()=>{p.removeEventListener("scroll",E),p.visualViewport?.removeEventListener("resize",E);const a=l.querySelector("#interscroller-top-band"),n=l.querySelector("#interscroller-bottom-band");a&&a.remove(),n&&n.remove(),g?s.setAttribute("style",g):s.removeAttribute("style"),x?y.setAttribute("style",x):y.removeAttribute("style")}};let _=()=>{};function F({adFormat:b="",stickyOffset:i=0,logoPosX:y=0,logoHeight:p=0,logoSmallHeight:l=0,...A}={}){typeof _=="function"&&_();let s=()=>{};return b==="fireplace"?s=H(i):b==="fireplace-collant"?s=z(i):b==="logomorph"?s=O(y,p,l):b==="interscroller"?s=V(A):console.warn("[powered-ad-config] Unknown ad format:",b),_=typeof s=="function"?s:()=>{},_}return F}));
|
package/package.json
CHANGED