powered-ad-config 0.0.89 → 0.0.91
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 +362 -309
- package/dist/powered-ad-config.umd.js +7 -7
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
1
|
+
const V = (w) => {
|
|
2
|
+
const n = window.frameElement ? window.frameElement : null;
|
|
3
|
+
if (!n) return () => {
|
|
4
4
|
};
|
|
5
5
|
const y = window.parent;
|
|
6
6
|
if (!y || y === window) return () => {
|
|
7
7
|
};
|
|
8
|
-
let
|
|
8
|
+
let d = null;
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
d = y.document, y.location.href;
|
|
11
11
|
} catch {
|
|
12
12
|
return () => {
|
|
13
13
|
};
|
|
@@ -22,10 +22,10 @@ const _ = (b) => {
|
|
|
22
22
|
yPosHalfpage: 72,
|
|
23
23
|
stickyMargin: { offset: 72, isSticky: !0 },
|
|
24
24
|
zIndex: function() {
|
|
25
|
-
const o = window.parent.document,
|
|
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"),
|
|
25
|
+
const o = window.parent.document, f = (v, t) => v.forEach((r) => t.forEach(([m, h]) => r.style[m] = h));
|
|
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"), f(o.querySelectorAll(".column"), [["position", "relative"]]), f(o.querySelectorAll(".advert"), [["position", "relative"]]), f(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
|
+
}, S = {
|
|
29
29
|
siteBackgroundColor: "#ffffff",
|
|
30
30
|
fireplaceLeftMargin: 0,
|
|
31
31
|
adNodeMarginTop: -24,
|
|
@@ -35,8 +35,8 @@ const _ = (b) => {
|
|
|
35
35
|
yPosHalfpage: 32,
|
|
36
36
|
stickyMargin: { offset: 32, isSticky: !0 },
|
|
37
37
|
zIndex: function() {
|
|
38
|
-
const o = window.parent.document,
|
|
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"),
|
|
38
|
+
const o = window.parent.document, f = (v, t) => v.forEach((r) => t.forEach(([m, h]) => r.style[m] = h));
|
|
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"), f(o.querySelectorAll(".column"), [["position", "relative"]]), f(o.querySelectorAll(".advert"), [["position", "relative"]]), f(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 = {
|
|
42
42
|
siteBackgroundColor: "#ffffff",
|
|
@@ -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) {
|
|
@@ -78,7 +78,7 @@ const _ = (b) => {
|
|
|
78
78
|
`, o.head.appendChild(r);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, b = {
|
|
82
82
|
siteBackgroundColor: "#f7f7f7",
|
|
83
83
|
fireplaceLeftMargin: 0,
|
|
84
84
|
adNodeMarginTop: -25,
|
|
@@ -88,8 +88,8 @@ const _ = (b) => {
|
|
|
88
88
|
yPosHalfpage: 32,
|
|
89
89
|
stickyMargin: { offset: 104, isSticky: !0 },
|
|
90
90
|
zIndex: function() {
|
|
91
|
-
const o = window.parent.document,
|
|
92
|
-
if (o.querySelector(".container--padded")?.setAttribute("style", "position:relative"),
|
|
91
|
+
const o = window.parent.document, f = (t, r) => t.forEach((m) => r.forEach(([h, e]) => m.style[h] = e));
|
|
92
|
+
if (o.querySelector(".container--padded")?.setAttribute("style", "position:relative"), f(o.querySelectorAll(".advert"), [["position", "relative"]]), o.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
93
93
|
let t = o.createElement("style");
|
|
94
94
|
t.innerHTML = `
|
|
95
95
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
@@ -98,7 +98,7 @@ const _ = (b) => {
|
|
|
98
98
|
`, o.head.appendChild(t);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, A = {
|
|
102
102
|
siteBackgroundColor: "#ffffff",
|
|
103
103
|
fireplaceLeftMargin: 0,
|
|
104
104
|
adNodeMarginTop: -32,
|
|
@@ -111,15 +111,15 @@ 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:
|
|
116
|
-
{ site: "https://www.nine.com.au/product-reviews", config:
|
|
117
|
-
{ site: "https://www.nine.com.au/property", config:
|
|
118
|
-
{ site: "https://www.nine.com.au/entertainment", config:
|
|
119
|
-
{ site: "https://staging.nine.com.au/sport", config:
|
|
120
|
-
{ site: "https://staging.nine.com.au/product-reviews", config:
|
|
121
|
-
{ site: "https://staging.nine.com.au/property", config:
|
|
122
|
-
{ site: "https://staging.nine.com.au/entertainment", config:
|
|
114
|
+
}, M = [
|
|
115
|
+
{ site: "https://www.nine.com.au/sport", config: g },
|
|
116
|
+
{ site: "https://www.nine.com.au/product-reviews", config: S },
|
|
117
|
+
{ site: "https://www.nine.com.au/property", config: S },
|
|
118
|
+
{ site: "https://www.nine.com.au/entertainment", config: S },
|
|
119
|
+
{ site: "https://staging.nine.com.au/sport", config: g },
|
|
120
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: S },
|
|
121
|
+
{ site: "https://staging.nine.com.au/property", config: S },
|
|
122
|
+
{ site: "https://staging.nine.com.au/entertainment", config: S },
|
|
123
123
|
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: s },
|
|
124
124
|
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: s },
|
|
125
125
|
{ site: "https://preview.nine.com.au/", config: s },
|
|
@@ -134,61 +134,61 @@ const _ = (b) => {
|
|
|
134
134
|
{ site: "https://coach", config: l },
|
|
135
135
|
{ site: "https://kitchen", config: l },
|
|
136
136
|
{ site: "https://finance", config: l },
|
|
137
|
-
{ site: "https://wwos", config:
|
|
138
|
-
{ site: "https://staging.wwos", config:
|
|
139
|
-
{ site: "https://www.9news", config:
|
|
140
|
-
{ site: "https://staging.9news", config:
|
|
137
|
+
{ site: "https://wwos", config: b },
|
|
138
|
+
{ site: "https://staging.wwos", config: g },
|
|
139
|
+
{ site: "https://www.9news", config: A },
|
|
140
|
+
{ site: "https://staging.9news", config: A },
|
|
141
141
|
{ site: "https://www.yourtv", config: l },
|
|
142
142
|
{ site: "https://staging.yourtv", config: l },
|
|
143
|
-
{ site: "https://9now", config:
|
|
143
|
+
{ site: "https://9now", config: S },
|
|
144
144
|
{ site: "https://creative-preview-an.com", config: l }
|
|
145
|
-
],
|
|
145
|
+
], E = () => {
|
|
146
146
|
const o = window.document.getElementById("nineContent");
|
|
147
|
-
o && (o.style.backgroundColor =
|
|
148
|
-
},
|
|
147
|
+
o && (o.style.backgroundColor = x.siteBackgroundColor), D(), H(), y.addEventListener("scroll", I), c = setTimeout(I, 50);
|
|
148
|
+
}, C = () => {
|
|
149
149
|
let o = null;
|
|
150
|
-
return o =
|
|
151
|
-
},
|
|
150
|
+
return o = d.querySelector('div[id*="billboard"][id*="above"]'), o;
|
|
151
|
+
}, B = () => {
|
|
152
152
|
const o = y.location.href;
|
|
153
|
-
for (let
|
|
154
|
-
if (o.indexOf(
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
-
if (!
|
|
158
|
-
const o =
|
|
153
|
+
for (let f = 0; f < M.length; f += 1)
|
|
154
|
+
if (o.indexOf(M[f].site) >= 0)
|
|
155
|
+
return M[f].config;
|
|
156
|
+
}, H = () => {
|
|
157
|
+
if (!n) return;
|
|
158
|
+
const o = n.style;
|
|
159
159
|
o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.transform = "translate(-50%, 0)";
|
|
160
160
|
}, D = () => {
|
|
161
|
-
if (!
|
|
162
|
-
const o =
|
|
163
|
-
|
|
161
|
+
if (!N) return;
|
|
162
|
+
const o = N.style;
|
|
163
|
+
N.className = "", o.minHeight = "250px", o.marginTop = x.adNodeMarginTop + "px", o.marginBottom = x.adNodeMarginBottom + "px", o.position = "static", o.display = "block", x.zIndex && x.zIndex();
|
|
164
164
|
}, I = () => {
|
|
165
|
-
const o = y.scrollY,
|
|
166
|
-
o >= 0 && o <=
|
|
167
|
-
},
|
|
168
|
-
if (!
|
|
165
|
+
const o = y.scrollY, f = n.style, v = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
166
|
+
o >= 0 && o <= i ? (f.transform = `translate(-50%, ${-o}px)`, v.transform = "translateY(0)") : o > i && o <= p ? (f.transform = `translate(-50%, ${-i}px)`, v.transform = `translateY(${i - o}px)`) : o > p && (f.transform = `translate(-50%, ${-i}px)`, v.transform = "translateY(-250px)");
|
|
167
|
+
}, N = C(), x = B();
|
|
168
|
+
if (!x) return () => {
|
|
169
169
|
};
|
|
170
|
-
let
|
|
171
|
-
const
|
|
172
|
-
return
|
|
173
|
-
y.removeEventListener("scroll", I),
|
|
170
|
+
let c = null;
|
|
171
|
+
const i = -x.responsiveScroll + w, p = i + 250;
|
|
172
|
+
return E(), () => {
|
|
173
|
+
y.removeEventListener("scroll", I), c && (clearTimeout(c), c = null);
|
|
174
174
|
};
|
|
175
|
-
},
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
175
|
+
}, F = (w) => {
|
|
176
|
+
const n = window.frameElement ? window.frameElement : null;
|
|
177
|
+
if (!n) return () => {
|
|
178
178
|
};
|
|
179
179
|
const y = window.parent;
|
|
180
180
|
if (!y || y === window) return () => {
|
|
181
181
|
};
|
|
182
|
-
let
|
|
182
|
+
let d = null;
|
|
183
183
|
try {
|
|
184
|
-
|
|
184
|
+
d = y.document, y.location.href;
|
|
185
185
|
} catch {
|
|
186
186
|
return () => {
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
const l = document.getElementById("nineMasthead"),
|
|
189
|
+
const l = document.getElementById("nineMasthead"), S = 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,10 +199,10 @@ const _ = (b) => {
|
|
|
199
199
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
200
200
|
maskOffset: 298,
|
|
201
201
|
zIndex: function() {
|
|
202
|
-
const e = window.parent.document,
|
|
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"),
|
|
202
|
+
const e = window.parent.document, a = (u, q) => u.forEach((k) => q.forEach(([T, L]) => k.style[T] = L));
|
|
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"), a(e.querySelectorAll(".column"), [["position", "relative"]]), a(e.querySelectorAll(".advert"), [["position", "relative"]]), a(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
|
+
}, b = {
|
|
206
206
|
siteBackgroundColor: "#ffffff",
|
|
207
207
|
fireplaceLeftMargin: 0,
|
|
208
208
|
adNodeMarginTop: -24,
|
|
@@ -213,10 +213,10 @@ 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,
|
|
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"),
|
|
216
|
+
const e = window.parent.document, a = (u, q) => u.forEach((k) => q.forEach(([T, L]) => k.style[T] = L));
|
|
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"), a(e.querySelectorAll(".column"), [["position", "relative"]]), a(e.querySelectorAll(".advert"), [["position", "relative"]]), a(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
|
+
}, A = {
|
|
220
220
|
siteBackgroundColor: "#ffffff",
|
|
221
221
|
fireplaceLeftMargin: 0,
|
|
222
222
|
adNodeMarginTop: -24,
|
|
@@ -229,15 +229,15 @@ const _ = (b) => {
|
|
|
229
229
|
zIndex: function() {
|
|
230
230
|
const e = window.parent.document;
|
|
231
231
|
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"]')) {
|
|
232
|
-
let
|
|
233
|
-
|
|
232
|
+
let u = e.createElement("style");
|
|
233
|
+
u.innerHTML = `
|
|
234
234
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
235
235
|
position: static;
|
|
236
236
|
}
|
|
237
|
-
`, e.head.appendChild(
|
|
237
|
+
`, e.head.appendChild(u);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
},
|
|
240
|
+
}, M = {
|
|
241
241
|
siteBackgroundColor: "#ffffff",
|
|
242
242
|
fireplaceLeftMargin: 0,
|
|
243
243
|
adNodeMarginTop: -24,
|
|
@@ -248,17 +248,17 @@ const _ = (b) => {
|
|
|
248
248
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
249
249
|
maskOffset: 312,
|
|
250
250
|
zIndex: function() {
|
|
251
|
-
const e = window.parent.document,
|
|
252
|
-
if (
|
|
253
|
-
let
|
|
254
|
-
|
|
251
|
+
const e = window.parent.document, u = e.querySelector("footer").previousElementSibling;
|
|
252
|
+
if (u && u.tagName.toLowerCase() === "div" && (u.style.position = "relative"), e.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
253
|
+
let k = e.createElement("style");
|
|
254
|
+
k.innerHTML = `
|
|
255
255
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
256
256
|
position: static;
|
|
257
257
|
}
|
|
258
|
-
`, e.head.appendChild(
|
|
258
|
+
`, e.head.appendChild(k);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, E = {
|
|
262
262
|
siteBackgroundColor: "#ffffff",
|
|
263
263
|
fireplaceLeftMargin: 0,
|
|
264
264
|
adNodeMarginTop: -25,
|
|
@@ -269,17 +269,17 @@ const _ = (b) => {
|
|
|
269
269
|
stickyMargin: { offset: 175, isSticky: !0 },
|
|
270
270
|
maskOffset: 274,
|
|
271
271
|
zIndex: function() {
|
|
272
|
-
const e = window.parent.document,
|
|
273
|
-
if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"),
|
|
274
|
-
let
|
|
275
|
-
|
|
272
|
+
const e = window.parent.document, a = (q, k) => q.forEach((T) => k.forEach(([L, O]) => T.style[L] = O));
|
|
273
|
+
if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), a(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
|
+
let q = e.createElement("style");
|
|
275
|
+
q.innerHTML = `
|
|
276
276
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
277
277
|
position: static;
|
|
278
278
|
}
|
|
279
|
-
`, e.head.appendChild(
|
|
279
|
+
`, e.head.appendChild(q);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, C = {
|
|
283
283
|
siteBackgroundColor: "#ffffff",
|
|
284
284
|
fireplaceLeftMargin: 0,
|
|
285
285
|
adNodeMarginTop: -32,
|
|
@@ -292,103 +292,103 @@ const _ = (b) => {
|
|
|
292
292
|
zIndex: function() {
|
|
293
293
|
const e = window.parent.document;
|
|
294
294
|
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);");
|
|
295
|
-
const
|
|
296
|
-
|
|
295
|
+
const a = e.querySelector('[class*="VideoIndexComponent"]');
|
|
296
|
+
a && (e.querySelector(".breadcrumbs")?.setAttribute("style", "display:none"), a.style.maxWidth = "1190px", a.style.margin = "auto", a.style.position = "relative");
|
|
297
297
|
}
|
|
298
|
-
},
|
|
299
|
-
{ site: "https://www.nine.com.au/sport", config:
|
|
300
|
-
{ site: "https://www.nine.com.au/product-reviews", config:
|
|
301
|
-
{ site: "https://www.nine.com.au/property", config:
|
|
302
|
-
{ site: "https://www.nine.com.au/entertainment", config:
|
|
303
|
-
{ site: "https://staging.nine.com.au/sport", config:
|
|
304
|
-
{ site: "https://staging.nine.com.au/product-reviews", config:
|
|
305
|
-
{ site: "https://staging.nine.com.au/property", config:
|
|
306
|
-
{ site: "https://staging.nine.com.au/entertainment", config:
|
|
307
|
-
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config:
|
|
308
|
-
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config:
|
|
309
|
-
{ site: "https://preview.nine.com.au/", config:
|
|
310
|
-
{ site: "https://www.nine", config:
|
|
311
|
-
{ site: "https://staging.nine", config:
|
|
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:
|
|
327
|
-
{ site: "https://9now", config:
|
|
328
|
-
{ site: "https://creative-preview-an.com", config:
|
|
329
|
-
],
|
|
298
|
+
}, B = [
|
|
299
|
+
{ site: "https://www.nine.com.au/sport", config: M },
|
|
300
|
+
{ site: "https://www.nine.com.au/product-reviews", config: b },
|
|
301
|
+
{ site: "https://www.nine.com.au/property", config: b },
|
|
302
|
+
{ site: "https://www.nine.com.au/entertainment", config: b },
|
|
303
|
+
{ site: "https://staging.nine.com.au/sport", config: M },
|
|
304
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: b },
|
|
305
|
+
{ site: "https://staging.nine.com.au/property", config: b },
|
|
306
|
+
{ site: "https://staging.nine.com.au/entertainment", config: b },
|
|
307
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: A },
|
|
308
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: A },
|
|
309
|
+
{ site: "https://preview.nine.com.au/", config: A },
|
|
310
|
+
{ site: "https://www.nine", config: A },
|
|
311
|
+
{ site: "https://staging.nine", config: A },
|
|
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: E },
|
|
322
|
+
{ site: "https://staging.wwos", config: M },
|
|
323
|
+
{ site: "https://www.9news", config: C },
|
|
324
|
+
{ site: "https://staging.9news", config: C },
|
|
325
|
+
{ site: "https://www.yourtv", config: g },
|
|
326
|
+
{ site: "https://staging.yourtv", config: g },
|
|
327
|
+
{ site: "https://9now", config: b },
|
|
328
|
+
{ site: "https://creative-preview-an.com", config: g }
|
|
329
|
+
], H = () => {
|
|
330
330
|
const e = window.document.getElementById("nineContent");
|
|
331
|
-
e && (e.style.backgroundColor = t.siteBackgroundColor), l && (
|
|
331
|
+
e && (e.style.backgroundColor = t.siteBackgroundColor), l && (S.setProperty("--masthead-height", "250px"), S.height = "var(--masthead-height)"), c(), x(), I(), i(), y.addEventListener("scroll", f, { passive: !0 }), r = setTimeout(f, 50);
|
|
332
332
|
}, D = () => {
|
|
333
333
|
let e = null;
|
|
334
|
-
return e =
|
|
334
|
+
return e = d.querySelector('div[id*="billboard"][id*="above"]'), e;
|
|
335
335
|
}, I = () => {
|
|
336
336
|
let e = null;
|
|
337
337
|
if (!window.parent) return e;
|
|
338
|
-
if (e =
|
|
339
|
-
let
|
|
340
|
-
for (let
|
|
341
|
-
if (
|
|
342
|
-
|
|
338
|
+
if (e = d.querySelector('div[id*="halfpage"][id*="above"]'), !e) return;
|
|
339
|
+
let a = e;
|
|
340
|
+
for (let u = 0; u < 3; u++)
|
|
341
|
+
if (a = a.parentNode, a && getComputedStyle(a).position === "sticky") {
|
|
342
|
+
a.setAttribute("style", `top: ${t.stickyMargin.offset}px`);
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
|
-
},
|
|
345
|
+
}, N = () => {
|
|
346
346
|
const e = y.location.href;
|
|
347
|
-
for (let
|
|
348
|
-
if (e.indexOf(
|
|
349
|
-
return
|
|
350
|
-
},
|
|
351
|
-
if (!
|
|
352
|
-
const e =
|
|
347
|
+
for (let a = 0; a < B.length; a += 1)
|
|
348
|
+
if (e.indexOf(B[a].site) >= 0)
|
|
349
|
+
return B[a].config;
|
|
350
|
+
}, x = () => {
|
|
351
|
+
if (!n) return;
|
|
352
|
+
const e = n.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
|
-
},
|
|
355
|
-
if (!
|
|
356
|
-
const e =
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
s =
|
|
354
|
+
}, c = () => {
|
|
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
|
+
}, i = () => {
|
|
359
|
+
s = d.querySelector('div[data-contentunit-id="stan"]')?.parentNode || d.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode || d.querySelector('div[class*="__MyContainer"]') || d.querySelector('div[class*="__ArticleContainer"]') || d.querySelector('div[class*="__VideoIndexComponent"]') || d.querySelector("div.container.layout") || d.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
|
|
362
|
-
const
|
|
363
|
-
const e = y.scrollY,
|
|
361
|
+
let p = 0, o = 0;
|
|
362
|
+
const f = () => {
|
|
363
|
+
const e = y.scrollY, a = e > p, u = e > h ? e - t.maskOffset : 0, q = Math.abs(u - o);
|
|
364
364
|
if (s)
|
|
365
|
-
if (
|
|
366
|
-
if (
|
|
367
|
-
const
|
|
368
|
-
s.style.transition = "none", s.style.setProperty("--mask-inset", `${
|
|
365
|
+
if (a && u > o)
|
|
366
|
+
if (q > 100) {
|
|
367
|
+
const k = Math.max(0, u - 100);
|
|
368
|
+
s.style.transition = "none", s.style.setProperty("--mask-inset", `${k}px`), s.offsetHeight, s.style.transition = "clip-path 0.3s ease-out", s.style.setProperty("--mask-inset", `${u}px`);
|
|
369
369
|
} else
|
|
370
|
-
s.style.transition = "clip-path 0.3s ease-out", s.style.setProperty("--mask-inset", `${
|
|
370
|
+
s.style.transition = "clip-path 0.3s ease-out", s.style.setProperty("--mask-inset", `${u}px`);
|
|
371
371
|
else
|
|
372
|
-
s.style.transition = "none", s.style.setProperty("--mask-inset", `${
|
|
373
|
-
|
|
374
|
-
},
|
|
372
|
+
s.style.transition = "none", s.style.setProperty("--mask-inset", `${u}px`);
|
|
373
|
+
p = e, o = u, e > h ? (n.style.setProperty("--transform-y", `${-m}px`), S.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : e > m && e <= h ? (n.style.setProperty("--transform-y", `${-m}px`), S.setProperty("--masthead-height", `${250 + m - e}px`), window.CollantOn && window.goBillboard()) : e >= 0 && e <= m && (n.style.setProperty("--transform-y", `${-e}px`), S.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
|
|
374
|
+
}, v = D(), t = N();
|
|
375
375
|
if (!t) return () => {
|
|
376
376
|
};
|
|
377
377
|
let r = null;
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
y.removeEventListener("scroll",
|
|
378
|
+
const m = -t.responsiveScroll + w, h = m + 150;
|
|
379
|
+
return H(), () => {
|
|
380
|
+
y.removeEventListener("scroll", f), r && (clearTimeout(r), r = null);
|
|
381
381
|
};
|
|
382
|
-
},
|
|
383
|
-
const
|
|
384
|
-
if (!
|
|
382
|
+
}, X = (w, n, y) => {
|
|
383
|
+
const d = window.frameElement ? window.frameElement : null;
|
|
384
|
+
if (!d) return () => {
|
|
385
385
|
};
|
|
386
386
|
const l = window.parent;
|
|
387
387
|
if (!l || l === window) return () => {
|
|
388
388
|
};
|
|
389
|
-
let
|
|
389
|
+
let S = null;
|
|
390
390
|
try {
|
|
391
|
-
|
|
391
|
+
S = l.document, l.location.href;
|
|
392
392
|
} catch {
|
|
393
393
|
return () => {
|
|
394
394
|
};
|
|
@@ -402,10 +402,10 @@ const _ = (b) => {
|
|
|
402
402
|
logoSmallTransform: "translateX(0px)",
|
|
403
403
|
logoSmallFilter: "none",
|
|
404
404
|
zIndex: function() {
|
|
405
|
-
const t = window.parent.document, r = (
|
|
405
|
+
const t = window.parent.document, r = (m, h) => m.forEach((e) => h.forEach(([a, u]) => e.style[a] = u));
|
|
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%",
|
|
@@ -414,10 +414,10 @@ const _ = (b) => {
|
|
|
414
414
|
logoSmallTransform: "translateX(-50%)",
|
|
415
415
|
logoSmallFilter: "none",
|
|
416
416
|
zIndex: function() {
|
|
417
|
-
const t = window.parent.document, r = (
|
|
417
|
+
const t = window.parent.document, r = (m, h) => m.forEach((e) => h.forEach(([a, u]) => e.style[a] = u));
|
|
418
418
|
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");
|
|
419
419
|
}
|
|
420
|
-
},
|
|
420
|
+
}, b = {
|
|
421
421
|
siteBackgroundColor: "#ffffff",
|
|
422
422
|
logoTop: "44px",
|
|
423
423
|
logoLeft: "50%",
|
|
@@ -426,10 +426,10 @@ const _ = (b) => {
|
|
|
426
426
|
logoSmallTransform: "translateX(-50%)",
|
|
427
427
|
logoSmallFilter: "none",
|
|
428
428
|
zIndex: function() {
|
|
429
|
-
const t = window.parent.document, r = (
|
|
429
|
+
const t = window.parent.document, r = (m, h) => m.forEach((e) => h.forEach(([a, u]) => e.style[a] = u));
|
|
430
430
|
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");
|
|
431
431
|
}
|
|
432
|
-
},
|
|
432
|
+
}, A = {
|
|
433
433
|
siteBackgroundColor: "#ffffff",
|
|
434
434
|
logoTop: "44px",
|
|
435
435
|
logoLeft: "50%",
|
|
@@ -438,10 +438,10 @@ const _ = (b) => {
|
|
|
438
438
|
logoSmallTransform: "translateX(-50%)",
|
|
439
439
|
logoSmallFilter: "none",
|
|
440
440
|
zIndex: function() {
|
|
441
|
-
const t = window.parent.document, r = (
|
|
441
|
+
const t = window.parent.document, r = (m, h) => m.forEach((e) => h.forEach(([a, u]) => e.style[a] = u));
|
|
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
|
+
}, M = {
|
|
445
445
|
siteBackgroundColor: "#ffffff",
|
|
446
446
|
logoTop: "-148px",
|
|
447
447
|
logoLeft: "50%",
|
|
@@ -450,10 +450,10 @@ const _ = (b) => {
|
|
|
450
450
|
logoSmallTransform: "translateX(-50%)",
|
|
451
451
|
logoSmallFilter: "none",
|
|
452
452
|
zIndex: function() {
|
|
453
|
-
const t = window.parent.document, r = (
|
|
453
|
+
const t = window.parent.document, r = (m, h) => m.forEach((e) => h.forEach(([a, u]) => e.style[a] = u));
|
|
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
|
+
}, E = {
|
|
457
457
|
siteBackgroundColor: "#ffffff",
|
|
458
458
|
logoTop: "44px",
|
|
459
459
|
logoLeft: "50%",
|
|
@@ -465,85 +465,101 @@ 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
|
+
}, C = [
|
|
469
469
|
{ site: "https://www.nine.com.au/sport", config: s },
|
|
470
|
-
{ site: "https://www.nine.com.au/product-reviews", config:
|
|
471
|
-
{ site: "https://www.nine.com.au/property", config:
|
|
472
|
-
{ site: "https://www.nine.com.au/entertainment", config:
|
|
470
|
+
{ site: "https://www.nine.com.au/product-reviews", config: b },
|
|
471
|
+
{ site: "https://www.nine.com.au/property", config: b },
|
|
472
|
+
{ site: "https://www.nine.com.au/entertainment", config: b },
|
|
473
473
|
{ site: "https://staging.nine.com.au/sport", config: s },
|
|
474
|
-
{ site: "https://staging.nine.com.au/product-reviews", config:
|
|
475
|
-
{ site: "https://staging.nine.com.au/property", config:
|
|
476
|
-
{ site: "https://staging.nine.com.au/entertainment", config:
|
|
477
|
-
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config:
|
|
478
|
-
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config:
|
|
479
|
-
{ site: "https://preview.nine.com.au/", config:
|
|
480
|
-
{ site: "https://www.nine", config:
|
|
481
|
-
{ site: "https://staging.nine", config:
|
|
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:
|
|
497
|
-
{ site: "https://9now", config:
|
|
498
|
-
{ site: "https://creative-preview-an.com", config:
|
|
499
|
-
],
|
|
474
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: b },
|
|
475
|
+
{ site: "https://staging.nine.com.au/property", config: b },
|
|
476
|
+
{ site: "https://staging.nine.com.au/entertainment", config: b },
|
|
477
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: A },
|
|
478
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: A },
|
|
479
|
+
{ site: "https://preview.nine.com.au/", config: A },
|
|
480
|
+
{ site: "https://www.nine", config: A },
|
|
481
|
+
{ site: "https://staging.nine", config: A },
|
|
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: M },
|
|
492
|
+
{ site: "https://staging.wwos", config: M },
|
|
493
|
+
{ site: "https://www.9news", config: E },
|
|
494
|
+
{ site: "https://staging.9news", config: E },
|
|
495
|
+
{ site: "https://www.yourtv", config: g },
|
|
496
|
+
{ site: "https://staging.yourtv", config: g },
|
|
497
|
+
{ site: "https://9now", config: b },
|
|
498
|
+
{ site: "https://creative-preview-an.com", config: g }
|
|
499
|
+
], B = () => {
|
|
500
500
|
const t = window.document.getElementById("logo-small");
|
|
501
|
-
t && (t.style.left =
|
|
502
|
-
},
|
|
501
|
+
t && (t.style.left = p.logoSmallLeft, t.style.transform = p.logoSmallTransform, t.style.filter = p.logoSmallFilter), N(), I(), l.addEventListener("scroll", c), o = setTimeout(c, 50);
|
|
502
|
+
}, H = () => {
|
|
503
503
|
let t = null;
|
|
504
|
-
return t =
|
|
504
|
+
return t = S.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
|
|
505
505
|
}, D = () => {
|
|
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 < C.length; r += 1)
|
|
508
|
+
if (t.indexOf(C[r].site) >= 0)
|
|
509
|
+
return C[r].config;
|
|
510
510
|
}, I = () => {
|
|
511
|
-
if (!
|
|
512
|
-
const t =
|
|
513
|
-
t.width = "100%", t.height = `${
|
|
514
|
-
},
|
|
515
|
-
if (!
|
|
516
|
-
const t =
|
|
517
|
-
t.maxHeight = `${
|
|
518
|
-
},
|
|
519
|
-
if (!
|
|
520
|
-
const r =
|
|
521
|
-
t === "big" && !window.bigActive ? (r.maxHeight = `${
|
|
522
|
-
},
|
|
511
|
+
if (!d) return;
|
|
512
|
+
const t = d.style;
|
|
513
|
+
t.width = "100%", t.height = `${n}px`, t.position = "relative";
|
|
514
|
+
}, N = () => {
|
|
515
|
+
if (!i) return;
|
|
516
|
+
const t = i.style;
|
|
517
|
+
t.maxHeight = `${n}px`, t.minHeight = `${n}px`, t.marginTop = "0px", t.marginBottom = "0px", t.position = "absolute", t.width = "1900px", t.top = p.logoTop, t.left = p.logoLeft, t.transform = p.logoTransform, t.zIndex = "10000", t.pointerEvents = "none", p.zIndex && p.zIndex();
|
|
518
|
+
}, x = (t) => {
|
|
519
|
+
if (!i) return;
|
|
520
|
+
const r = i.style;
|
|
521
|
+
t === "big" && !window.bigActive ? (r.maxHeight = `${n}px`, r.minHeight = `${n}px`, r.position = "absolute", r.top = p.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
|
+
}, c = () => {
|
|
523
523
|
const t = l.scrollY;
|
|
524
|
-
|
|
525
|
-
},
|
|
526
|
-
if (!
|
|
524
|
+
d.style, t >= 0 && t <= f ? x("big") : t > f && (t > v ? x("small") : x("big"), v = t <= 0 ? 0 : t);
|
|
525
|
+
}, i = H(), p = D();
|
|
526
|
+
if (!p) return () => {
|
|
527
527
|
};
|
|
528
528
|
let o = null;
|
|
529
|
-
const
|
|
530
|
-
let
|
|
531
|
-
return
|
|
532
|
-
l.removeEventListener("scroll",
|
|
529
|
+
const f = w;
|
|
530
|
+
let v = 0;
|
|
531
|
+
return B(), () => {
|
|
532
|
+
l.removeEventListener("scroll", c), o && (clearTimeout(o), o = null);
|
|
533
533
|
};
|
|
534
|
-
},
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
return Math.pow(2, -10 *
|
|
538
|
-
},
|
|
539
|
-
const
|
|
534
|
+
}, Y = (w) => {
|
|
535
|
+
if (w === 0 || w === 1) return w;
|
|
536
|
+
const n = 2 * Math.PI / 3;
|
|
537
|
+
return Math.pow(2, -10 * w) * Math.sin((w * 10 - 0.75) * n) + 1;
|
|
538
|
+
}, U = (w, n = 50) => `linear(${Array.from({ length: n + 1 }, (d, l) => w(l / n)).map((d) => +d.toFixed(4)).join(", ")})`, W = U(Y), j = (w = {}) => {
|
|
539
|
+
const n = {
|
|
540
540
|
// Ad scroll zone
|
|
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
|
|
555
|
+
// Band overhang
|
|
556
|
+
// A masking block rendered above the top band, coloured to match the
|
|
557
|
+
// pre-content background. Covers any iframe pixels that bleed above the
|
|
558
|
+
// band due to clip-path inset rounding or slide-mode sub-pixel gaps.
|
|
559
|
+
bandOverhangHeight: 20,
|
|
560
|
+
// px — height of the masking block
|
|
561
|
+
bandOverhangBg: "#fff",
|
|
562
|
+
// fallback colour if auto-detect finds nothing
|
|
547
563
|
// Band colours
|
|
548
564
|
bandBg: "#222",
|
|
549
565
|
// band background colour
|
|
@@ -554,7 +570,7 @@ const _ = (b) => {
|
|
|
554
570
|
bandFontFamily: "Arial, Helvetica, sans-serif",
|
|
555
571
|
bandLetterSpacing: "1px",
|
|
556
572
|
// Band labels
|
|
557
|
-
labelTop: "
|
|
573
|
+
labelTop: "Advertisement6",
|
|
558
574
|
labelBottomResume: "Scroll to continue",
|
|
559
575
|
// shown from 0–20% ad progress
|
|
560
576
|
labelBottomMid: "Keep scrolling",
|
|
@@ -570,20 +586,28 @@ const _ = (b) => {
|
|
|
570
586
|
// Band z-index (should sit below page header)
|
|
571
587
|
zIndexTop: 9,
|
|
572
588
|
zIndexBottom: 8,
|
|
589
|
+
// Bottom band visibility thresholds
|
|
590
|
+
// How many px the ad container must travel past the viewport bottom before
|
|
591
|
+
// the bottom band appears (on scroll down / reveal).
|
|
592
|
+
bottomBandShowAt: 100,
|
|
593
|
+
// How many px the container must scroll back above the viewport bottom before
|
|
594
|
+
// the bottom band hides again (on scroll up). Should be less than bottomBandShowAt
|
|
595
|
+
// to create a hysteresis gap and prevent flickering.
|
|
596
|
+
bottomBandHideAt: 60,
|
|
573
597
|
// Stretch animation
|
|
574
598
|
snapPx: 50,
|
|
575
599
|
// gap (px) at which the elastic snap fires
|
|
576
600
|
snapOverlap: 2,
|
|
577
601
|
// px — fires the snap this many px early (trigger timing)
|
|
578
602
|
stretchOverlap: 4,
|
|
579
|
-
// px —
|
|
580
|
-
//
|
|
603
|
+
// px — offsets the touchpoint this many px early, so the
|
|
604
|
+
// stretch animation begins before the band reaches the viewport bottom
|
|
581
605
|
snapDuration: 0.9,
|
|
582
606
|
// seconds for the snap return
|
|
583
607
|
// CSS timing function for the snap — any valid CSS transition-timing-function.
|
|
584
608
|
// Default: easeOutElastic encoded as a CSS linear() function (50-point sample).
|
|
585
609
|
// See: https://developer.mozilla.org/en-US/blog/custom-easing-in-css-with-linear/
|
|
586
|
-
snapEase:
|
|
610
|
+
snapEase: W,
|
|
587
611
|
// ── Scroll callbacks ───────────────────────────────────────────
|
|
588
612
|
// Called once when the ad starts to reveal (top band visible, ad beginning to scroll).
|
|
589
613
|
onEnter: null,
|
|
@@ -597,127 +621,156 @@ const _ = (b) => {
|
|
|
597
621
|
// Example: [{ at: 0.2, onEnter: () => playVideo(), onLeave: () => pauseVideo() }]
|
|
598
622
|
thresholds: [],
|
|
599
623
|
// Merge caller-supplied options (overrides any default above)
|
|
600
|
-
...
|
|
624
|
+
...w
|
|
601
625
|
}, y = window.frameElement ? window.frameElement : null;
|
|
602
626
|
if (!y) return () => {
|
|
603
627
|
};
|
|
604
|
-
const
|
|
605
|
-
if (!
|
|
628
|
+
const d = window.parent;
|
|
629
|
+
if (!d || d === window) return () => {
|
|
606
630
|
};
|
|
607
631
|
let l = null;
|
|
608
632
|
try {
|
|
609
|
-
l =
|
|
633
|
+
l = d.document, d.location.href;
|
|
610
634
|
} catch {
|
|
611
635
|
return () => {
|
|
612
636
|
};
|
|
613
637
|
}
|
|
614
638
|
const s = (() => {
|
|
615
|
-
const
|
|
616
|
-
if (
|
|
617
|
-
let
|
|
618
|
-
for (;
|
|
619
|
-
if (
|
|
620
|
-
|
|
639
|
+
const c = l.querySelector("#adspot-mobile-mobile-3-above");
|
|
640
|
+
if (c) return c;
|
|
641
|
+
let i = y.parentElement;
|
|
642
|
+
for (; i && i !== l.body; ) {
|
|
643
|
+
if (i.id && i.id.includes("adspot")) return i;
|
|
644
|
+
i = i.parentElement;
|
|
621
645
|
}
|
|
622
646
|
return y.parentElement;
|
|
623
647
|
})();
|
|
624
648
|
if (!s) return () => {
|
|
625
649
|
};
|
|
626
|
-
const
|
|
650
|
+
const g = s.getAttribute("style"), b = y.getAttribute("style"), A = {
|
|
627
651
|
width: "100vw",
|
|
628
652
|
marginLeft: "calc(50% - 50vw)",
|
|
629
|
-
height:
|
|
630
|
-
backgroundColor:
|
|
631
|
-
color:
|
|
632
|
-
fontSize:
|
|
633
|
-
fontFamily:
|
|
653
|
+
height: n.bandHeight + "px",
|
|
654
|
+
backgroundColor: n.bandBg,
|
|
655
|
+
color: n.bandColor,
|
|
656
|
+
fontSize: n.bandFontSize,
|
|
657
|
+
fontFamily: n.bandFontFamily,
|
|
634
658
|
textTransform: "uppercase",
|
|
635
|
-
letterSpacing:
|
|
659
|
+
letterSpacing: n.bandLetterSpacing,
|
|
636
660
|
display: "flex",
|
|
637
661
|
alignItems: "center",
|
|
638
662
|
justifyContent: "center",
|
|
639
663
|
pointerEvents: "none"
|
|
640
664
|
};
|
|
641
665
|
(() => {
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
const
|
|
647
|
-
|
|
666
|
+
const c = s.style;
|
|
667
|
+
c.height = n.adScrollHeight, c.position = "relative", c.clipPath = `inset(-${n.bandHeight}px 0 0 0)`, c.overflow = "visible", c.width = "100vw", c.maxWidth = "100vw", c.marginLeft = "calc(50% - 50vw)", c.marginRight = "0", c.marginTop = "0", c.marginBottom = "0", c.padding = "0", c.className = "";
|
|
668
|
+
const i = y.style;
|
|
669
|
+
i.position = "fixed", i.top = "0", i.left = "0", i.width = "100vw", i.height = "100vh", i.maxWidth = "100vw", i.margin = "0", i.padding = "0", i.border = "none", i.zIndex = "1";
|
|
670
|
+
const p = s.previousElementSibling, o = () => {
|
|
671
|
+
const h = ["transparent", "rgba(0, 0, 0, 0)", ""];
|
|
672
|
+
let e = p || s.parentElement;
|
|
673
|
+
for (; e && e !== l.documentElement; ) {
|
|
674
|
+
const a = d.getComputedStyle(e).backgroundColor;
|
|
675
|
+
if (!h.includes(a)) return a;
|
|
676
|
+
e = e.parentElement;
|
|
677
|
+
}
|
|
678
|
+
return n.bandOverhangBg;
|
|
679
|
+
}, f = l.createElement("div");
|
|
680
|
+
f.id = "interscroller-top-band-wrapper", Object.assign(f.style, {
|
|
648
681
|
position: "sticky",
|
|
649
682
|
bottom: "0",
|
|
650
|
-
|
|
651
|
-
|
|
683
|
+
width: "100vw",
|
|
684
|
+
marginLeft: "calc(50% - 50vw)",
|
|
685
|
+
zIndex: n.zIndexTop,
|
|
686
|
+
pointerEvents: "none",
|
|
687
|
+
...n.revealMode === "slide" && { marginBottom: `-${n.bandHeight}px` }
|
|
688
|
+
});
|
|
689
|
+
const v = l.createElement("div");
|
|
690
|
+
v.id = "interscroller-top-band-overhang", Object.assign(v.style, {
|
|
691
|
+
width: "100%",
|
|
692
|
+
height: n.bandOverhangHeight + "px",
|
|
693
|
+
backgroundColor: o(),
|
|
694
|
+
pointerEvents: "none"
|
|
652
695
|
});
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
const o = l.createElement("div");
|
|
656
|
-
o.id = "interscroller-bottom-band", Object.assign(o.style, q, {
|
|
696
|
+
const t = l.createElement("div");
|
|
697
|
+
t.id = "interscroller-top-band", t.textContent = n.labelTop, Object.assign(t.style, A, {
|
|
657
698
|
position: "relative",
|
|
658
|
-
//
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
699
|
+
// wrapper is the sticky anchor
|
|
700
|
+
width: "100%",
|
|
701
|
+
// wrapper handles the full-bleed breakout
|
|
702
|
+
marginLeft: "0",
|
|
703
|
+
transformOrigin: "top center"
|
|
704
|
+
}), f.appendChild(v), f.appendChild(t), p ? p.appendChild(f) : s.parentElement.insertBefore(f, s);
|
|
705
|
+
const r = l.createElement("div");
|
|
706
|
+
r.id = "interscroller-bottom-band", Object.assign(r.style, A, {
|
|
707
|
+
position: "fixed",
|
|
708
|
+
// stays fixed; transform slides it in/out
|
|
709
|
+
bottom: "0",
|
|
710
|
+
left: "0",
|
|
711
|
+
zIndex: n.zIndexBottom,
|
|
712
|
+
display: "flex",
|
|
713
|
+
// always rendered — no display toggling
|
|
714
|
+
overflow: "hidden",
|
|
663
715
|
// clips the progress fill to the band bounds
|
|
716
|
+
transform: "translateY(100%)",
|
|
717
|
+
// starts off-screen below viewport
|
|
718
|
+
transition: "none"
|
|
719
|
+
// no animation on first paint
|
|
664
720
|
});
|
|
665
|
-
const
|
|
666
|
-
if (
|
|
667
|
-
const
|
|
668
|
-
|
|
721
|
+
const m = l.createElement("span");
|
|
722
|
+
if (m.id = "interscroller-bottom-label", m.textContent = n.labelBottomResume, m.style.cssText = "position:relative;z-index:1;pointer-events:none;", r.appendChild(m), n.progressBarColor) {
|
|
723
|
+
const h = l.createElement("span");
|
|
724
|
+
h.id = "interscroller-bottom-progress", h.style.cssText = [
|
|
669
725
|
"position:absolute",
|
|
670
726
|
"inset:0",
|
|
671
727
|
"width:0%",
|
|
672
|
-
`background:${
|
|
728
|
+
`background:${n.progressBarColor}`,
|
|
673
729
|
"transition:none",
|
|
674
730
|
"z-index:0",
|
|
675
731
|
"pointer-events:none"
|
|
676
|
-
].join(";"),
|
|
732
|
+
].join(";"), r.appendChild(h);
|
|
677
733
|
}
|
|
678
|
-
s.after(
|
|
734
|
+
s.after(r);
|
|
679
735
|
})();
|
|
680
|
-
const
|
|
681
|
-
let
|
|
682
|
-
const
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
else
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
n.style.bottom = `${w}px`, n.style.top = "", n.style.left = "0", n.style.marginLeft = "0", n.style.width = "100vw", n.style.display = "flex";
|
|
703
|
-
} else
|
|
704
|
-
n.style.display = "none";
|
|
736
|
+
const E = n.bandHeight, C = n.snapPx;
|
|
737
|
+
let B = !1, H = !1, D = !1, I = !1;
|
|
738
|
+
const N = (n.thresholds || []).map(() => !1), x = () => {
|
|
739
|
+
const c = l.querySelector("#interscroller-top-band"), i = l.querySelector("#interscroller-bottom-band");
|
|
740
|
+
if (!i) return;
|
|
741
|
+
const p = s.getBoundingClientRect(), o = d.innerHeight, f = p.top <= o, v = p.bottom <= o - E, t = I ? p.top <= o - n.bottomBandHideAt : p.top <= o - n.bottomBandShowAt;
|
|
742
|
+
n.revealMode === "slide" && (y.style.top = f && p.top > 0 ? `${p.top}px` : "0");
|
|
743
|
+
const r = s.offsetHeight, m = Math.min(1, Math.max(0, (o - p.top) / (r + o))), h = Math.min(1, Math.max(0, (o - p.top) / (r + E))), e = Math.min(1, Math.max(0, (o - p.top) / r)), a = Math.min(p.bottom, o) - Math.max(p.top - E, 0), u = Math.min(1, Math.max(0, a / o)), q = Math.max(0, Math.round(p.bottom - o));
|
|
744
|
+
!H && f && n.onEnter && n.onEnter(), !D && v && n.onExit && n.onExit(), H = f, D = v, I = t, n.onProgress && n.onProgress({ scrollProgress: m, adExposure: e, viewportCoverage: u, pxRemaining: q }), (n.thresholds || []).forEach((P, z) => {
|
|
745
|
+
const R = N[z], _ = m >= P.at;
|
|
746
|
+
!R && _ ? (N[z] = !0, P.onEnter && P.onEnter(m)) : R && !_ && (N[z] = !1, P.onLeave && P.onLeave(m));
|
|
747
|
+
});
|
|
748
|
+
const k = o - (n.revealMode === "slide" ? E : 0);
|
|
749
|
+
if (c && p.top <= k + n.stretchOverlap && !v) {
|
|
750
|
+
const P = k - p.top;
|
|
751
|
+
if (!B && P <= C - n.snapOverlap) {
|
|
752
|
+
const z = 1 + Math.max(0, P + n.stretchOverlap) / E;
|
|
753
|
+
c.style.transition = "none", c.style.transform = `scaleY(${z})`;
|
|
754
|
+
} else !B && P > C - n.snapOverlap && (B = !0, c.style.transition = `transform ${n.snapDuration}s ${n.snapEase}`, c.style.transform = "scaleY(1)");
|
|
755
|
+
} else c && p.top > k + n.stretchOverlap && (B = !1, c.style.transition = "none", c.style.transform = "scaleY(1)");
|
|
756
|
+
const T = l.querySelector("#interscroller-bottom-label"), L = l.querySelector("#interscroller-bottom-progress"), O = d.visualViewport ? Math.round(d.innerHeight - (d.visualViewport.offsetTop + d.visualViewport.height)) : 0;
|
|
757
|
+
v ? (i.style.transition = "none", i.style.transform = "none", i.style.position = "sticky", i.style.top = "0", i.style.bottom = "", i.style.left = "", i.style.marginLeft = "calc(50% - 50vw)", i.style.width = "100vw", T && (T.textContent = n.labelBottomNow), L && (L.style.width = "100%")) : t ? (T && (T.textContent = q > 0 ? h < 0.2 ? n.labelBottomResume : h < 0.75 ? n.labelBottomMid : n.labelBottomLate : n.labelBottomNow), L && (L.style.width = `${Math.round(h * 100)}%`), i.style.transition = "transform 0.3s ease", i.style.transform = "translateY(0)", i.style.position = "fixed", i.style.bottom = `${O}px`, i.style.top = "", i.style.left = "0", i.style.marginLeft = "0", i.style.width = "100vw") : (i.style.transition = "transform 0.3s ease", i.style.transform = "translateY(100%)", i.style.position = "fixed", i.style.bottom = `${O}px`, i.style.left = "0", i.style.marginLeft = "0", i.style.width = "100vw");
|
|
705
758
|
};
|
|
706
|
-
return
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
|
|
759
|
+
return x(), d.addEventListener("scroll", x, { passive: !0 }), d.visualViewport?.addEventListener("resize", x, { passive: !0 }), () => {
|
|
760
|
+
d.removeEventListener("scroll", x), d.visualViewport?.removeEventListener("resize", x);
|
|
761
|
+
const c = l.querySelector("#interscroller-top-band"), i = l.querySelector("#interscroller-top-band-wrapper"), p = l.querySelector("#interscroller-bottom-band");
|
|
762
|
+
i ? i.remove() : c && c.remove(), p && p.remove(), g ? s.setAttribute("style", g) : s.removeAttribute("style"), b ? y.setAttribute("style", b) : y.removeAttribute("style");
|
|
710
763
|
};
|
|
711
764
|
};
|
|
712
|
-
let
|
|
765
|
+
let $ = () => {
|
|
713
766
|
};
|
|
714
|
-
function
|
|
715
|
-
typeof
|
|
767
|
+
function G({ adFormat: w = "", stickyOffset: n = 0, logoPosX: y = 0, logoHeight: d = 0, logoSmallHeight: l = 0, ...S } = {}) {
|
|
768
|
+
typeof $ == "function" && $();
|
|
716
769
|
let s = () => {
|
|
717
770
|
};
|
|
718
|
-
return
|
|
719
|
-
},
|
|
771
|
+
return w === "fireplace" ? s = V(n) : w === "fireplace-collant" ? s = F(n) : w === "logomorph" ? s = X(y, d, l) : w === "interscroller" ? s = j(S) : console.warn("[powered-ad-config] Unknown ad format:", w), $ = typeof s == "function" ? s : () => {
|
|
772
|
+
}, $;
|
|
720
773
|
}
|
|
721
774
|
export {
|
|
722
|
-
|
|
775
|
+
G as default
|
|
723
776
|
};
|