powered-ad-config 0.1.2 → 0.1.3
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 +417 -385
- package/dist/powered-ad-config.umd.js +16 -10
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const V = (
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
1
|
+
const V = (x) => {
|
|
2
|
+
const n = window.frameElement ? window.frameElement : null;
|
|
3
|
+
if (!n) return () => {
|
|
4
4
|
};
|
|
5
|
-
const
|
|
6
|
-
if (!
|
|
5
|
+
const c = window.parent;
|
|
6
|
+
if (!c || c === window) return () => {
|
|
7
7
|
};
|
|
8
|
-
let
|
|
8
|
+
let l = null;
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
l = c.document, c.location.href;
|
|
11
11
|
} catch {
|
|
12
12
|
return () => {
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const a = {
|
|
16
16
|
siteBackgroundColor: "#ffffff",
|
|
17
17
|
fireplaceLeftMargin: 0,
|
|
18
18
|
adNodeMarginTop: -24,
|
|
@@ -22,10 +22,10 @@ const V = (A) => {
|
|
|
22
22
|
yPosHalfpage: 72,
|
|
23
23
|
stickyMargin: { offset: 72, isSticky: !0 },
|
|
24
24
|
zIndex: function() {
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const i = window.parent.document, m = (w, t) => w.forEach((e) => t.forEach(([p, h]) => e.style[p] = h));
|
|
26
|
+
i.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector("article")?.setAttribute("style", "position:relative"), i.querySelector("#article")?.setAttribute("style", "position:relative"), i.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), i.querySelector("#Index")?.setAttribute("style", "position:relative"), i.querySelector(".show")?.setAttribute("style", "position:relative"), i.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), m(i.querySelectorAll(".column"), [["position", "relative"]]), m(i.querySelectorAll(".advert"), [["position", "relative"]]), m(i.querySelectorAll("blockquote"), [["zIndex", "1"]]), i.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:-24px"), i.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), i.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
|
|
27
27
|
}
|
|
28
|
-
},
|
|
28
|
+
}, C = {
|
|
29
29
|
siteBackgroundColor: "#ffffff",
|
|
30
30
|
fireplaceLeftMargin: 0,
|
|
31
31
|
adNodeMarginTop: -24,
|
|
@@ -35,8 +35,8 @@ const V = (A) => {
|
|
|
35
35
|
yPosHalfpage: 32,
|
|
36
36
|
stickyMargin: { offset: 32, isSticky: !0 },
|
|
37
37
|
zIndex: function() {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const i = window.parent.document, m = (w, t) => w.forEach((e) => t.forEach(([p, h]) => e.style[p] = h));
|
|
39
|
+
i.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector("article")?.setAttribute("style", "position:relative"), i.querySelector("#article")?.setAttribute("style", "position:relative"), i.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), i.querySelector("#Index")?.setAttribute("style", "position:relative"), i.querySelector(".show")?.setAttribute("style", "position:relative"), m(i.querySelectorAll(".column"), [["position", "relative"]]), m(i.querySelectorAll(".advert"), [["position", "relative"]]), m(i.querySelectorAll("blockquote"), [["zIndex", "1"]]), i.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), i.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px"), i.querySelector('div[class*="MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px");
|
|
40
40
|
}
|
|
41
41
|
}, r = {
|
|
42
42
|
siteBackgroundColor: "#ffffff",
|
|
@@ -48,14 +48,14 @@ const V = (A) => {
|
|
|
48
48
|
yPosHalfpage: 32,
|
|
49
49
|
stickyMargin: { offset: 8, isSticky: !0 },
|
|
50
50
|
zIndex: function() {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
let
|
|
54
|
-
|
|
51
|
+
const i = window.parent.document;
|
|
52
|
+
if (i.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style", "position:relative"), i.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style", "position:relative"), i.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style", "position:relative"), i.querySelector("small")?.setAttribute("style", "position:inherit"), i.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
53
|
+
let w = i.createElement("style");
|
|
54
|
+
w.innerHTML = `
|
|
55
55
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
56
56
|
position: static;
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`, i.head.appendChild(w);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}, f = {
|
|
@@ -68,14 +68,14 @@ const V = (A) => {
|
|
|
68
68
|
yPosHalfpage: 32,
|
|
69
69
|
stickyMargin: { offset: 104, isSticky: !0 },
|
|
70
70
|
zIndex: function() {
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
let
|
|
74
|
-
|
|
71
|
+
const i = window.parent.document, w = i.querySelector("footer").previousElementSibling;
|
|
72
|
+
if (w && w.tagName.toLowerCase() === "div" && (w.style.position = "relative"), i.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
73
|
+
let e = i.createElement("style");
|
|
74
|
+
e.innerHTML = `
|
|
75
75
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
76
76
|
position: static;
|
|
77
77
|
}
|
|
78
|
-
`,
|
|
78
|
+
`, i.head.appendChild(e);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}, q = {
|
|
@@ -88,17 +88,17 @@ const V = (A) => {
|
|
|
88
88
|
yPosHalfpage: 32,
|
|
89
89
|
stickyMargin: { offset: 104, isSticky: !0 },
|
|
90
90
|
zIndex: function() {
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
93
|
-
let t =
|
|
91
|
+
const i = window.parent.document, m = (t, e) => t.forEach((p) => e.forEach(([h, o]) => p.style[h] = o));
|
|
92
|
+
if (i.querySelector(".container--padded")?.setAttribute("style", "position:relative"), m(i.querySelectorAll(".advert"), [["position", "relative"]]), i.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), i.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), i.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none"), i.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
93
|
+
let t = i.createElement("style");
|
|
94
94
|
t.innerHTML = `
|
|
95
95
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
96
96
|
position: static;
|
|
97
97
|
}
|
|
98
|
-
`,
|
|
98
|
+
`, i.head.appendChild(t);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, v = {
|
|
102
102
|
siteBackgroundColor: "#ffffff",
|
|
103
103
|
fireplaceLeftMargin: 0,
|
|
104
104
|
adNodeMarginTop: -32,
|
|
@@ -108,85 +108,85 @@ const V = (A) => {
|
|
|
108
108
|
yPosHalfpage: 16,
|
|
109
109
|
stickyMargin: { offset: 16, isSticky: !0 },
|
|
110
110
|
zIndex: function() {
|
|
111
|
-
const
|
|
112
|
-
|
|
111
|
+
const i = window.parent.document;
|
|
112
|
+
i.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), i.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), i.querySelector(".content")?.setAttribute("style", "padding-top:32px"), i.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), i.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), i.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
|
|
113
113
|
}
|
|
114
114
|
}, N = [
|
|
115
115
|
{ site: "https://www.nine.com.au/sport", config: f },
|
|
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:
|
|
116
|
+
{ site: "https://www.nine.com.au/product-reviews", config: C },
|
|
117
|
+
{ site: "https://www.nine.com.au/property", config: C },
|
|
118
|
+
{ site: "https://www.nine.com.au/entertainment", config: C },
|
|
119
119
|
{ site: "https://staging.nine.com.au/sport", config: f },
|
|
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:
|
|
120
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: C },
|
|
121
|
+
{ site: "https://staging.nine.com.au/property", config: C },
|
|
122
|
+
{ site: "https://staging.nine.com.au/entertainment", config: C },
|
|
123
123
|
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: r },
|
|
124
124
|
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: r },
|
|
125
125
|
{ site: "https://preview.nine.com.au/", config: r },
|
|
126
126
|
{ site: "https://www.nine", config: r },
|
|
127
127
|
{ site: "https://staging.nine", config: r },
|
|
128
|
-
{ site: "https://entertainment", config:
|
|
129
|
-
{ site: "https://celebrity", config:
|
|
130
|
-
{ site: "https://homes", config:
|
|
131
|
-
{ site: "https://travel", config:
|
|
132
|
-
{ site: "https://honey", config:
|
|
133
|
-
{ site: "https://style", config:
|
|
134
|
-
{ site: "https://coach", config:
|
|
135
|
-
{ site: "https://kitchen", config:
|
|
136
|
-
{ site: "https://finance", config:
|
|
128
|
+
{ site: "https://entertainment", config: a },
|
|
129
|
+
{ site: "https://celebrity", config: a },
|
|
130
|
+
{ site: "https://homes", config: a },
|
|
131
|
+
{ site: "https://travel", config: a },
|
|
132
|
+
{ site: "https://honey", config: a },
|
|
133
|
+
{ site: "https://style", config: a },
|
|
134
|
+
{ site: "https://coach", config: a },
|
|
135
|
+
{ site: "https://kitchen", config: a },
|
|
136
|
+
{ site: "https://finance", config: a },
|
|
137
137
|
{ site: "https://wwos", config: q },
|
|
138
138
|
{ site: "https://staging.wwos", config: f },
|
|
139
|
-
{ site: "https://www.9news", config:
|
|
140
|
-
{ site: "https://staging.9news", config:
|
|
141
|
-
{ site: "https://www.yourtv", config:
|
|
142
|
-
{ site: "https://staging.yourtv", config:
|
|
143
|
-
{ site: "https://9now", config:
|
|
144
|
-
{ site: "https://creative-preview-an.com", config:
|
|
139
|
+
{ site: "https://www.9news", config: v },
|
|
140
|
+
{ site: "https://staging.9news", config: v },
|
|
141
|
+
{ site: "https://www.yourtv", config: a },
|
|
142
|
+
{ site: "https://staging.yourtv", config: a },
|
|
143
|
+
{ site: "https://9now", config: C },
|
|
144
|
+
{ site: "https://creative-preview-an.com", config: a }
|
|
145
145
|
], I = () => {
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
let
|
|
150
|
-
return
|
|
146
|
+
const i = window.document.getElementById("nineContent");
|
|
147
|
+
i && (i.style.backgroundColor = d.siteBackgroundColor), b(), y(), c.addEventListener("scroll", P), g = setTimeout(P, 50);
|
|
148
|
+
}, S = () => {
|
|
149
|
+
let i = null;
|
|
150
|
+
return i = l.querySelector('div[id*="billboard"][id*="above"]'), i;
|
|
151
151
|
}, M = () => {
|
|
152
|
-
const
|
|
153
|
-
for (let
|
|
154
|
-
if (
|
|
155
|
-
return N[
|
|
156
|
-
},
|
|
157
|
-
if (!
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
if (!
|
|
162
|
-
const
|
|
163
|
-
|
|
152
|
+
const i = c.location.href;
|
|
153
|
+
for (let m = 0; m < N.length; m += 1)
|
|
154
|
+
if (i.indexOf(N[m].site) >= 0)
|
|
155
|
+
return N[m].config;
|
|
156
|
+
}, y = () => {
|
|
157
|
+
if (!n) return;
|
|
158
|
+
const i = n.style;
|
|
159
|
+
i.width = "100%", i.height = "1000px", i.position = "fixed", i.left = "50%", i.transform = "translate(-50%, 0)";
|
|
160
|
+
}, b = () => {
|
|
161
|
+
if (!B) return;
|
|
162
|
+
const i = B.style;
|
|
163
|
+
B.className = "", i.minHeight = "250px", i.marginTop = d.adNodeMarginTop + "px", i.marginBottom = d.adNodeMarginBottom + "px", i.position = "static", i.display = "block", d.zIndex && d.zIndex();
|
|
164
164
|
}, P = () => {
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
if (!
|
|
165
|
+
const i = c.scrollY, m = n.style, w = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
166
|
+
i >= 0 && i <= k ? (m.transform = `translate(-50%, ${-i}px)`, w.transform = "translateY(0)") : i > k && i <= A ? (m.transform = `translate(-50%, ${-k}px)`, w.transform = `translateY(${k - i}px)`) : i > A && (m.transform = `translate(-50%, ${-k}px)`, w.transform = "translateY(-250px)");
|
|
167
|
+
}, B = S(), d = M();
|
|
168
|
+
if (!d) return () => {
|
|
169
169
|
};
|
|
170
|
-
let
|
|
171
|
-
const
|
|
170
|
+
let g = null;
|
|
171
|
+
const k = -d.responsiveScroll + x, A = k + 250;
|
|
172
172
|
return I(), () => {
|
|
173
|
-
|
|
173
|
+
c.removeEventListener("scroll", P), g && (clearTimeout(g), g = null);
|
|
174
174
|
};
|
|
175
|
-
}, Y = (
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
175
|
+
}, Y = (x) => {
|
|
176
|
+
const n = window.frameElement ? window.frameElement : null;
|
|
177
|
+
if (!n) return () => {
|
|
178
178
|
};
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
179
|
+
const c = window.parent;
|
|
180
|
+
if (!c || c === window) return () => {
|
|
181
181
|
};
|
|
182
|
-
let
|
|
182
|
+
let l = null;
|
|
183
183
|
try {
|
|
184
|
-
|
|
184
|
+
l = c.document, c.location.href;
|
|
185
185
|
} catch {
|
|
186
186
|
return () => {
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
const
|
|
189
|
+
const a = document.getElementById("nineMasthead"), C = a ? a.style : {};
|
|
190
190
|
let r;
|
|
191
191
|
const f = {
|
|
192
192
|
siteBackgroundColor: "#ffffff",
|
|
@@ -199,8 +199,8 @@ const V = (A) => {
|
|
|
199
199
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
200
200
|
maskOffset: 298,
|
|
201
201
|
zIndex: function() {
|
|
202
|
-
const
|
|
203
|
-
|
|
202
|
+
const o = window.parent.document, s = (u, E) => u.forEach((T) => E.forEach(([H, L]) => T.style[H] = L));
|
|
203
|
+
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"), s(o.querySelectorAll(".column"), [["position", "relative"]]), s(o.querySelectorAll(".advert"), [["position", "relative"]]), s(o.querySelectorAll("blockquote"), [["zIndex", "1"]]), o.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
|
|
204
204
|
}
|
|
205
205
|
}, q = {
|
|
206
206
|
siteBackgroundColor: "#ffffff",
|
|
@@ -213,10 +213,10 @@ const V = (A) => {
|
|
|
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
|
|
217
|
-
|
|
216
|
+
const o = window.parent.document, s = (u, E) => u.forEach((T) => E.forEach(([H, L]) => T.style[H] = L));
|
|
217
|
+
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"), s(o.querySelectorAll(".column"), [["position", "relative"]]), s(o.querySelectorAll(".advert"), [["position", "relative"]]), s(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");
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, v = {
|
|
220
220
|
siteBackgroundColor: "#ffffff",
|
|
221
221
|
fireplaceLeftMargin: 0,
|
|
222
222
|
adNodeMarginTop: -24,
|
|
@@ -227,14 +227,14 @@ const V = (A) => {
|
|
|
227
227
|
stickyMargin: { offset: 166, isSticky: !0 },
|
|
228
228
|
maskOffset: 304,
|
|
229
229
|
zIndex: function() {
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
let
|
|
233
|
-
|
|
230
|
+
const o = window.parent.document;
|
|
231
|
+
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"]')) {
|
|
232
|
+
let u = o.createElement("style");
|
|
233
|
+
u.innerHTML = `
|
|
234
234
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
235
235
|
position: static;
|
|
236
236
|
}
|
|
237
|
-
`,
|
|
237
|
+
`, o.head.appendChild(u);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}, N = {
|
|
@@ -248,14 +248,14 @@ const V = (A) => {
|
|
|
248
248
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
249
249
|
maskOffset: 312,
|
|
250
250
|
zIndex: function() {
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
253
|
-
let T =
|
|
251
|
+
const o = window.parent.document, u = o.querySelector("footer").previousElementSibling;
|
|
252
|
+
if (u && u.tagName.toLowerCase() === "div" && (u.style.position = "relative"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
253
|
+
let T = o.createElement("style");
|
|
254
254
|
T.innerHTML = `
|
|
255
255
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
256
256
|
position: static;
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`, o.head.appendChild(T);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
}, I = {
|
|
@@ -269,17 +269,17 @@ const V = (A) => {
|
|
|
269
269
|
stickyMargin: { offset: 175, isSticky: !0 },
|
|
270
270
|
maskOffset: 274,
|
|
271
271
|
zIndex: function() {
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
274
|
-
let
|
|
275
|
-
|
|
272
|
+
const o = window.parent.document, s = (E, T) => E.forEach((H) => T.forEach(([L, D]) => H.style[L] = D));
|
|
273
|
+
if (o.querySelector(".container--padded")?.setAttribute("style", "position:relative"), s(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(".score-strip")?.setAttribute("style", "display:none"), o.querySelector(".feed-header__breadcrumbs")?.setAttribute("style", "display:none"), o.querySelector(".layout.container")?.setAttribute("style", "padding:0"), o.querySelector(".empty-div")?.setAttribute("style", "display:none"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
274
|
+
let E = o.createElement("style");
|
|
275
|
+
E.innerHTML = `
|
|
276
276
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
277
277
|
position: static;
|
|
278
278
|
}
|
|
279
|
-
`,
|
|
279
|
+
`, o.head.appendChild(E);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, S = {
|
|
283
283
|
siteBackgroundColor: "#ffffff",
|
|
284
284
|
fireplaceLeftMargin: 0,
|
|
285
285
|
adNodeMarginTop: -32,
|
|
@@ -290,10 +290,10 @@ const V = (A) => {
|
|
|
290
290
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
291
291
|
maskOffset: window.parent.document.querySelector('div[class*="VideoIndexComponent"]') ? 324 : 292,
|
|
292
292
|
zIndex: function() {
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
293
|
+
const o = window.parent.document;
|
|
294
|
+
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);");
|
|
295
|
+
const s = o.querySelector('[class*="VideoIndexComponent"]');
|
|
296
|
+
s && (o.querySelector(".breadcrumbs")?.setAttribute("style", "display:none"), s.style.maxWidth = "1190px", s.style.margin = "auto", s.style.position = "relative");
|
|
297
297
|
}
|
|
298
298
|
}, M = [
|
|
299
299
|
{ site: "https://www.nine.com.au/sport", config: N },
|
|
@@ -304,11 +304,11 @@ const V = (A) => {
|
|
|
304
304
|
{ site: "https://staging.nine.com.au/product-reviews", config: q },
|
|
305
305
|
{ site: "https://staging.nine.com.au/property", config: q },
|
|
306
306
|
{ site: "https://staging.nine.com.au/entertainment", config: q },
|
|
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:
|
|
307
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: v },
|
|
308
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: v },
|
|
309
|
+
{ site: "https://preview.nine.com.au/", config: v },
|
|
310
|
+
{ site: "https://www.nine", config: v },
|
|
311
|
+
{ site: "https://staging.nine", config: v },
|
|
312
312
|
{ site: "https://entertainment", config: f },
|
|
313
313
|
{ site: "https://celebrity", config: f },
|
|
314
314
|
{ site: "https://homes", config: f },
|
|
@@ -320,75 +320,75 @@ const V = (A) => {
|
|
|
320
320
|
{ site: "https://finance", config: f },
|
|
321
321
|
{ site: "https://wwos", config: I },
|
|
322
322
|
{ site: "https://staging.wwos", config: N },
|
|
323
|
-
{ site: "https://www.9news", config:
|
|
324
|
-
{ site: "https://staging.9news", config:
|
|
323
|
+
{ site: "https://www.9news", config: S },
|
|
324
|
+
{ site: "https://staging.9news", config: S },
|
|
325
325
|
{ site: "https://www.yourtv", config: f },
|
|
326
326
|
{ site: "https://staging.yourtv", config: f },
|
|
327
327
|
{ site: "https://9now", config: q },
|
|
328
328
|
{ site: "https://creative-preview-an.com", config: f }
|
|
329
|
-
],
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
},
|
|
333
|
-
let
|
|
334
|
-
return
|
|
329
|
+
], y = () => {
|
|
330
|
+
const o = window.document.getElementById("nineContent");
|
|
331
|
+
o && (o.style.backgroundColor = t.siteBackgroundColor), a && (C.setProperty("--masthead-height", "250px"), C.height = "var(--masthead-height)"), g(), d(), P(), k(), c.addEventListener("scroll", m, { passive: !0 }), e = setTimeout(m, 50);
|
|
332
|
+
}, b = () => {
|
|
333
|
+
let o = null;
|
|
334
|
+
return o = l.querySelector('div[id*="billboard"][id*="above"]'), o;
|
|
335
335
|
}, P = () => {
|
|
336
|
-
let
|
|
337
|
-
if (!window.parent) return
|
|
338
|
-
if (
|
|
339
|
-
let
|
|
340
|
-
for (let
|
|
341
|
-
if (
|
|
342
|
-
|
|
336
|
+
let o = null;
|
|
337
|
+
if (!window.parent) return o;
|
|
338
|
+
if (o = l.querySelector('div[id*="halfpage"][id*="above"]'), !o) return;
|
|
339
|
+
let s = o;
|
|
340
|
+
for (let u = 0; u < 3; u++)
|
|
341
|
+
if (s = s.parentNode, s && getComputedStyle(s).position === "sticky") {
|
|
342
|
+
s.setAttribute("style", `top: ${t.stickyMargin.offset}px`);
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
|
-
},
|
|
346
|
-
const
|
|
347
|
-
for (let
|
|
348
|
-
if (
|
|
349
|
-
return M[
|
|
350
|
-
},
|
|
351
|
-
if (!
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
if (!
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
r =
|
|
345
|
+
}, B = () => {
|
|
346
|
+
const o = c.location.href;
|
|
347
|
+
for (let s = 0; s < M.length; s += 1)
|
|
348
|
+
if (o.indexOf(M[s].site) >= 0)
|
|
349
|
+
return M[s].config;
|
|
350
|
+
}, d = () => {
|
|
351
|
+
if (!n) return;
|
|
352
|
+
const o = n.style;
|
|
353
|
+
o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.setProperty("--transform-y", "0px"), o.transform = "translate3d(-50%, var(--transform-y), 0)";
|
|
354
|
+
}, g = () => {
|
|
355
|
+
if (!w) return;
|
|
356
|
+
const o = w.style;
|
|
357
|
+
w.className = "", o.minHeight = "250px", o.marginTop = t.adNodeMarginTop + "px", o.marginBottom = t.adNodeMarginBottom + "px", o.position = "static", o.display = "block", t.zIndex && t.zIndex();
|
|
358
|
+
}, k = () => {
|
|
359
|
+
r = l.querySelector('div[data-contentunit-id="stan"]')?.parentNode || l.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode || l.querySelector('div[class*="__MyContainer"]') || l.querySelector('div[class*="__ArticleContainer"]') || l.querySelector('div[class*="__VideoIndexComponent"]') || l.querySelector("div.container.layout") || l.querySelector("main.container.layout"), r && (r.style.willChange = "clip-path", r.style.transition = "none", r.style.webkitBackfaceVisibility = "hidden", r.style.backfaceVisibility = "hidden", r.style.transform = "translate3d(0,0,0)", r.style.backgroundColor = t.siteBackgroundColor, r.style.setProperty("--mask-inset", "0px"), r.style.clipPath = "inset(var(--mask-inset, 0px) 0 0 0)");
|
|
360
360
|
};
|
|
361
|
-
let
|
|
362
|
-
const
|
|
363
|
-
const
|
|
361
|
+
let A = 0, i = 0;
|
|
362
|
+
const m = () => {
|
|
363
|
+
const o = c.scrollY, s = o > A, u = o > h ? o - t.maskOffset : 0, E = Math.abs(u - i);
|
|
364
364
|
if (r)
|
|
365
|
-
if (
|
|
366
|
-
if (
|
|
367
|
-
const T = Math.max(0,
|
|
368
|
-
r.style.transition = "none", r.style.setProperty("--mask-inset", `${T}px`), r.offsetHeight, r.style.transition = "clip-path 0.3s ease-out", r.style.setProperty("--mask-inset", `${
|
|
365
|
+
if (s && u > i)
|
|
366
|
+
if (E > 100) {
|
|
367
|
+
const T = Math.max(0, u - 100);
|
|
368
|
+
r.style.transition = "none", r.style.setProperty("--mask-inset", `${T}px`), r.offsetHeight, r.style.transition = "clip-path 0.3s ease-out", r.style.setProperty("--mask-inset", `${u}px`);
|
|
369
369
|
} else
|
|
370
|
-
r.style.transition = "clip-path 0.3s ease-out", r.style.setProperty("--mask-inset", `${
|
|
370
|
+
r.style.transition = "clip-path 0.3s ease-out", r.style.setProperty("--mask-inset", `${u}px`);
|
|
371
371
|
else
|
|
372
|
-
r.style.transition = "none", r.style.setProperty("--mask-inset", `${
|
|
373
|
-
|
|
374
|
-
},
|
|
372
|
+
r.style.transition = "none", r.style.setProperty("--mask-inset", `${u}px`);
|
|
373
|
+
A = o, i = u, o > h ? (n.style.setProperty("--transform-y", `${-p}px`), C.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : o > p && o <= h ? (n.style.setProperty("--transform-y", `${-p}px`), C.setProperty("--masthead-height", `${250 + p - o}px`), window.CollantOn && window.goBillboard()) : o >= 0 && o <= p && (n.style.setProperty("--transform-y", `${-o}px`), C.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
|
|
374
|
+
}, w = b(), t = B();
|
|
375
375
|
if (!t) return () => {
|
|
376
376
|
};
|
|
377
|
-
let
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
|
|
377
|
+
let e = null;
|
|
378
|
+
const p = -t.responsiveScroll + x, h = p + 150;
|
|
379
|
+
return y(), () => {
|
|
380
|
+
c.removeEventListener("scroll", m), e && (clearTimeout(e), e = null);
|
|
381
381
|
};
|
|
382
|
-
},
|
|
383
|
-
const
|
|
384
|
-
if (!
|
|
382
|
+
}, U = (x, n, c) => {
|
|
383
|
+
const l = window.frameElement ? window.frameElement : null;
|
|
384
|
+
if (!l) return () => {
|
|
385
385
|
};
|
|
386
|
-
const
|
|
387
|
-
if (!
|
|
386
|
+
const a = window.parent;
|
|
387
|
+
if (!a || a === window) return () => {
|
|
388
388
|
};
|
|
389
|
-
let
|
|
389
|
+
let C = null;
|
|
390
390
|
try {
|
|
391
|
-
|
|
391
|
+
C = a.document, a.location.href;
|
|
392
392
|
} catch {
|
|
393
393
|
return () => {
|
|
394
394
|
};
|
|
@@ -402,8 +402,8 @@ const V = (A) => {
|
|
|
402
402
|
logoSmallTransform: "translateX(0px)",
|
|
403
403
|
logoSmallFilter: "none",
|
|
404
404
|
zIndex: function() {
|
|
405
|
-
const t = window.parent.document,
|
|
406
|
-
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"),
|
|
405
|
+
const t = window.parent.document, e = (p, h) => p.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
|
|
406
|
+
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), e(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
|
}, f = {
|
|
409
409
|
siteBackgroundColor: "#ffffff",
|
|
@@ -414,8 +414,8 @@ const V = (A) => {
|
|
|
414
414
|
logoSmallTransform: "translateX(-50%)",
|
|
415
415
|
logoSmallFilter: "none",
|
|
416
416
|
zIndex: function() {
|
|
417
|
-
const t = window.parent.document,
|
|
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"),
|
|
417
|
+
const t = window.parent.document, e = (p, h) => p.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
|
|
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"), e(t.querySelectorAll(".column"), [["position", "relative"]]), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(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
|
}, q = {
|
|
421
421
|
siteBackgroundColor: "#ffffff",
|
|
@@ -426,10 +426,10 @@ const V = (A) => {
|
|
|
426
426
|
logoSmallTransform: "translateX(-50%)",
|
|
427
427
|
logoSmallFilter: "none",
|
|
428
428
|
zIndex: function() {
|
|
429
|
-
const t = window.parent.document,
|
|
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"),
|
|
429
|
+
const t = window.parent.document, e = (p, h) => p.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
|
|
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"), e(t.querySelectorAll(".column"), [["position", "relative"]]), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(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
|
+
}, v = {
|
|
433
433
|
siteBackgroundColor: "#ffffff",
|
|
434
434
|
logoTop: "44px",
|
|
435
435
|
logoLeft: "50%",
|
|
@@ -438,8 +438,8 @@ const V = (A) => {
|
|
|
438
438
|
logoSmallTransform: "translateX(-50%)",
|
|
439
439
|
logoSmallFilter: "none",
|
|
440
440
|
zIndex: function() {
|
|
441
|
-
const t = window.parent.document,
|
|
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"),
|
|
441
|
+
const t = window.parent.document, e = (p, h) => p.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
|
|
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"), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(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"), e(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
|
}, N = {
|
|
445
445
|
siteBackgroundColor: "#ffffff",
|
|
@@ -450,8 +450,8 @@ const V = (A) => {
|
|
|
450
450
|
logoSmallTransform: "translateX(-50%)",
|
|
451
451
|
logoSmallFilter: "none",
|
|
452
452
|
zIndex: function() {
|
|
453
|
-
const t = window.parent.document,
|
|
454
|
-
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"),
|
|
453
|
+
const t = window.parent.document, e = (p, h) => p.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
|
|
454
|
+
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), e(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
|
}, I = {
|
|
457
457
|
siteBackgroundColor: "#ffffff",
|
|
@@ -465,7 +465,7 @@ const V = (A) => {
|
|
|
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
|
+
}, S = [
|
|
469
469
|
{ site: "https://www.nine.com.au/sport", config: r },
|
|
470
470
|
{ site: "https://www.nine.com.au/product-reviews", config: q },
|
|
471
471
|
{ site: "https://www.nine.com.au/property", config: q },
|
|
@@ -474,11 +474,11 @@ const V = (A) => {
|
|
|
474
474
|
{ site: "https://staging.nine.com.au/product-reviews", config: q },
|
|
475
475
|
{ site: "https://staging.nine.com.au/property", config: q },
|
|
476
476
|
{ site: "https://staging.nine.com.au/entertainment", config: q },
|
|
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:
|
|
477
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: v },
|
|
478
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: v },
|
|
479
|
+
{ site: "https://preview.nine.com.au/", config: v },
|
|
480
|
+
{ site: "https://www.nine", config: v },
|
|
481
|
+
{ site: "https://staging.nine", config: v },
|
|
482
482
|
{ site: "https://entertainment", config: f },
|
|
483
483
|
{ site: "https://celebrity", config: f },
|
|
484
484
|
{ site: "https://homes", config: f },
|
|
@@ -498,45 +498,45 @@ const V = (A) => {
|
|
|
498
498
|
{ site: "https://creative-preview-an.com", config: f }
|
|
499
499
|
], M = () => {
|
|
500
500
|
const t = window.document.getElementById("logo-small");
|
|
501
|
-
t && (t.style.left =
|
|
502
|
-
},
|
|
501
|
+
t && (t.style.left = A.logoSmallLeft, t.style.transform = A.logoSmallTransform, t.style.filter = A.logoSmallFilter), B(), P(), a.addEventListener("scroll", g), i = setTimeout(g, 50);
|
|
502
|
+
}, y = () => {
|
|
503
503
|
let t = null;
|
|
504
|
-
return t =
|
|
505
|
-
},
|
|
506
|
-
const t =
|
|
507
|
-
for (let
|
|
508
|
-
if (t.indexOf(
|
|
509
|
-
return
|
|
504
|
+
return t = C.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
|
|
505
|
+
}, b = () => {
|
|
506
|
+
const t = a.location.href;
|
|
507
|
+
for (let e = 0; e < S.length; e += 1)
|
|
508
|
+
if (t.indexOf(S[e].site) >= 0)
|
|
509
|
+
return S[e].config;
|
|
510
510
|
}, P = () => {
|
|
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
|
|
521
|
-
t === "big" && !window.bigActive ? (
|
|
522
|
-
},
|
|
523
|
-
const t =
|
|
524
|
-
|
|
525
|
-
},
|
|
526
|
-
if (!
|
|
511
|
+
if (!l) return;
|
|
512
|
+
const t = l.style;
|
|
513
|
+
t.width = "100%", t.height = `${n}px`, t.position = "relative";
|
|
514
|
+
}, B = () => {
|
|
515
|
+
if (!k) return;
|
|
516
|
+
const t = k.style;
|
|
517
|
+
t.maxHeight = `${n}px`, t.minHeight = `${n}px`, t.marginTop = "0px", t.marginBottom = "0px", t.position = "absolute", t.width = "1900px", t.top = A.logoTop, t.left = A.logoLeft, t.transform = A.logoTransform, t.zIndex = "10000", t.pointerEvents = "none", A.zIndex && A.zIndex();
|
|
518
|
+
}, d = (t) => {
|
|
519
|
+
if (!k) return;
|
|
520
|
+
const e = k.style;
|
|
521
|
+
t === "big" && !window.bigActive ? (e.maxHeight = `${n}px`, e.minHeight = `${n}px`, e.position = "absolute", e.top = A.logoTop, e.zIndex = "10000", window.loadBig()) : t === "small" && !window.smallActive && (e.maxHeight = `${c}px`, e.minHeight = `${c}px`, e.position = "fixed", e.top = "0px", e.zIndex = "100000", window.loadSmall());
|
|
522
|
+
}, g = () => {
|
|
523
|
+
const t = a.scrollY;
|
|
524
|
+
l.style, t >= 0 && t <= m ? d("big") : t > m && (t > w ? d("small") : d("big"), w = t <= 0 ? 0 : t);
|
|
525
|
+
}, k = y(), A = b();
|
|
526
|
+
if (!A) return () => {
|
|
527
527
|
};
|
|
528
|
-
let
|
|
529
|
-
const
|
|
530
|
-
let
|
|
528
|
+
let i = null;
|
|
529
|
+
const m = x;
|
|
530
|
+
let w = 0;
|
|
531
531
|
return M(), () => {
|
|
532
|
-
|
|
532
|
+
a.removeEventListener("scroll", g), i && (clearTimeout(i), i = null);
|
|
533
533
|
};
|
|
534
|
-
},
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
return Math.pow(2, -10 *
|
|
538
|
-
}, j = (
|
|
539
|
-
const
|
|
534
|
+
}, X = (x) => {
|
|
535
|
+
if (x === 0 || x === 1) return x;
|
|
536
|
+
const n = 2 * Math.PI / 3;
|
|
537
|
+
return Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * n) + 1;
|
|
538
|
+
}, j = (x, n = 50) => `linear(${Array.from({ length: n + 1 }, (l, a) => x(a / n)).map((l) => +l.toFixed(4)).join(", ")})`, G = j(X), K = (x = {}) => {
|
|
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.
|
|
@@ -605,42 +605,42 @@ const V = (A) => {
|
|
|
605
605
|
// Example: [{ at: 0.2, onEnter: () => playVideo(), onLeave: () => pauseVideo() }]
|
|
606
606
|
thresholds: [],
|
|
607
607
|
// Merge caller-supplied options (overrides any default above)
|
|
608
|
-
...
|
|
609
|
-
},
|
|
610
|
-
if (!
|
|
608
|
+
...x
|
|
609
|
+
}, c = window.frameElement ? window.frameElement : null;
|
|
610
|
+
if (!c) return () => {
|
|
611
611
|
};
|
|
612
|
-
const
|
|
613
|
-
if (!
|
|
612
|
+
const l = window.parent;
|
|
613
|
+
if (!l || l === window) return () => {
|
|
614
614
|
};
|
|
615
|
-
let
|
|
615
|
+
let a = null;
|
|
616
616
|
try {
|
|
617
|
-
|
|
617
|
+
a = l.document, l.location.href;
|
|
618
618
|
} catch {
|
|
619
619
|
return () => {
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
622
|
const r = (() => {
|
|
623
|
-
const t =
|
|
623
|
+
const t = a.querySelector("#adspot-mobile-mobile-3-above");
|
|
624
624
|
if (t) return t;
|
|
625
|
-
let
|
|
626
|
-
for (;
|
|
627
|
-
if (
|
|
628
|
-
|
|
625
|
+
let e = c.parentElement;
|
|
626
|
+
for (; e && e !== a.body; ) {
|
|
627
|
+
if (e.id && e.id.includes("adspot")) return e;
|
|
628
|
+
e = e.parentElement;
|
|
629
629
|
}
|
|
630
|
-
return
|
|
630
|
+
return c.parentElement;
|
|
631
631
|
})();
|
|
632
632
|
if (!r) return () => {
|
|
633
633
|
};
|
|
634
|
-
const f = r.getAttribute("style"), q =
|
|
634
|
+
const f = r.getAttribute("style"), q = c.getAttribute("style"), v = [], N = {
|
|
635
635
|
width: "100vw",
|
|
636
636
|
marginLeft: "calc(50% - 50vw)",
|
|
637
|
-
height:
|
|
638
|
-
backgroundColor:
|
|
639
|
-
color:
|
|
640
|
-
fontSize:
|
|
641
|
-
fontFamily:
|
|
637
|
+
height: n.bandHeight + "px",
|
|
638
|
+
backgroundColor: n.bandBg,
|
|
639
|
+
color: n.bandColor,
|
|
640
|
+
fontSize: n.bandFontSize,
|
|
641
|
+
fontFamily: n.bandFontFamily,
|
|
642
642
|
textTransform: "uppercase",
|
|
643
|
-
letterSpacing:
|
|
643
|
+
letterSpacing: n.bandLetterSpacing,
|
|
644
644
|
display: "flex",
|
|
645
645
|
alignItems: "center",
|
|
646
646
|
justifyContent: "center",
|
|
@@ -648,45 +648,45 @@ const V = (A) => {
|
|
|
648
648
|
};
|
|
649
649
|
(() => {
|
|
650
650
|
const t = r.style;
|
|
651
|
-
t.height =
|
|
652
|
-
let
|
|
653
|
-
for (let
|
|
654
|
-
const T =
|
|
651
|
+
t.height = n.adScrollHeight, t.maxHeight = n.adScrollHeight, t.position = "relative", r.setAttribute("poweredAC", "0.1.3"), t.clipPath = `inset(-${n.bandHeight - 1}px 0 0 0)`, t.overflow = "visible", t.width = "100vw", t.maxWidth = "100vw", t.marginLeft = "calc(50% - 50vw)", t.marginRight = "0", t.marginTop = "0", t.marginBottom = "0", t.padding = "0";
|
|
652
|
+
let e = r.parentElement;
|
|
653
|
+
for (let E = 0; E < 6 && e && e !== a.body; E++) {
|
|
654
|
+
const T = l.getComputedStyle(e);
|
|
655
655
|
let H = !1;
|
|
656
|
-
(T.overflow === "hidden" || T.overflowY === "hidden") && (
|
|
656
|
+
(T.overflow === "hidden" || T.overflowY === "hidden") && (v.push({ el: e, prop: "overflow", val: e.style.overflow }), v.push({ el: e, prop: "overflowY", val: e.style.overflowY }), e.style.overflow = "visible", e.style.overflowY = "visible", H = !0);
|
|
657
657
|
const L = parseFloat(T.height);
|
|
658
|
-
T.height !== "auto" && !isNaN(L) && L < 600 && (
|
|
658
|
+
T.height !== "auto" && !isNaN(L) && L < 600 && (v.push({ el: e, prop: "height", val: e.style.height }), e.style.height = "auto", H = !0);
|
|
659
659
|
const D = T.maxHeight;
|
|
660
|
-
if (D && D !== "none" && (
|
|
661
|
-
|
|
660
|
+
if (D && D !== "none" && (v.push({ el: e, prop: "maxHeight", val: e.style.maxHeight }), e.style.maxHeight = "none", H = !0), !H && E > 1) break;
|
|
661
|
+
e = e.parentElement;
|
|
662
662
|
}
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
|
|
663
|
+
const p = c.style;
|
|
664
|
+
p.position = "fixed", p.top = "0", p.left = "0", p.width = "100vw", p.height = "100vh", p.maxWidth = "100vw", p.margin = "0", p.padding = "0", p.border = "none", p.zIndex = "1";
|
|
665
|
+
const h = a.createElement("div");
|
|
666
|
+
h.id = "interscroller-top-band-wrapper", Object.assign(h.style, {
|
|
667
667
|
position: "sticky",
|
|
668
668
|
bottom: "0",
|
|
669
669
|
width: "100vw",
|
|
670
670
|
marginLeft: "calc(50% - 50vw)",
|
|
671
|
-
zIndex:
|
|
671
|
+
zIndex: n.zIndexTop,
|
|
672
672
|
pointerEvents: "none"
|
|
673
673
|
});
|
|
674
|
-
const
|
|
675
|
-
|
|
674
|
+
const o = a.createElement("div");
|
|
675
|
+
o.id = "interscroller-top-band", o.textContent = n.labelTop, Object.assign(o.style, N, {
|
|
676
676
|
position: "relative",
|
|
677
677
|
// wrapper is the sticky anchor
|
|
678
678
|
width: "100%",
|
|
679
679
|
// wrapper handles the full-bleed breakout
|
|
680
680
|
marginLeft: "0",
|
|
681
681
|
transformOrigin: "top center"
|
|
682
|
-
}),
|
|
683
|
-
const
|
|
684
|
-
|
|
682
|
+
}), h.appendChild(o), r.insertAdjacentElement("beforebegin", h);
|
|
683
|
+
const s = a.createElement("div");
|
|
684
|
+
s.id = "interscroller-bottom-band", Object.assign(s.style, N, {
|
|
685
685
|
position: "fixed",
|
|
686
686
|
// stays fixed; transform slides it in/out
|
|
687
687
|
bottom: "0",
|
|
688
688
|
left: "0",
|
|
689
|
-
zIndex:
|
|
689
|
+
zIndex: n.zIndexBottom,
|
|
690
690
|
display: "flex",
|
|
691
691
|
// always rendered — no display toggling
|
|
692
692
|
overflow: "hidden",
|
|
@@ -696,48 +696,48 @@ const V = (A) => {
|
|
|
696
696
|
transition: "none"
|
|
697
697
|
// no animation on first paint
|
|
698
698
|
});
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
const
|
|
702
|
-
|
|
699
|
+
const u = a.createElement("span");
|
|
700
|
+
if (u.id = "interscroller-bottom-label", u.textContent = n.labelBottomResume, u.style.cssText = "position:relative;z-index:1;pointer-events:none;", s.appendChild(u), n.progressBarColor) {
|
|
701
|
+
const E = a.createElement("span");
|
|
702
|
+
E.id = "interscroller-bottom-progress", E.style.cssText = [
|
|
703
703
|
"position:absolute",
|
|
704
704
|
"inset:0",
|
|
705
705
|
"width:0%",
|
|
706
|
-
`background:${
|
|
706
|
+
`background:${n.progressBarColor}`,
|
|
707
707
|
"transition:none",
|
|
708
708
|
"z-index:0",
|
|
709
709
|
"pointer-events:none"
|
|
710
|
-
].join(";"),
|
|
710
|
+
].join(";"), s.appendChild(E);
|
|
711
711
|
}
|
|
712
|
-
r.after(
|
|
712
|
+
r.after(s);
|
|
713
713
|
})();
|
|
714
|
-
const
|
|
715
|
-
let
|
|
716
|
-
const
|
|
717
|
-
if (!
|
|
718
|
-
const t = r.getBoundingClientRect(),
|
|
719
|
-
!
|
|
720
|
-
const O =
|
|
721
|
-
!O && F ? (
|
|
714
|
+
const S = a.querySelector("#interscroller-top-band"), M = a.querySelector("#interscroller-top-band-wrapper"), y = a.querySelector("#interscroller-bottom-band"), b = a.querySelector("#interscroller-bottom-label"), P = a.querySelector("#interscroller-bottom-progress"), B = n.bandHeight, d = n.snapPx;
|
|
715
|
+
let g = !1, k = !1, A = !1, i = !1;
|
|
716
|
+
const m = (n.thresholds || []).map(() => !1), w = () => {
|
|
717
|
+
if (!y) return;
|
|
718
|
+
const t = r.getBoundingClientRect(), e = l.innerHeight, p = t.top <= e, h = t.bottom <= e - B, o = i ? t.top <= e - n.bottomBandHideAt : t.top <= e - n.bottomBandShowAt, s = r.offsetHeight, u = Math.min(1, Math.max(0, (e - t.top) / (s + e))), E = Math.min(1, Math.max(0, (e - t.top) / (s + B))), T = Math.min(1, Math.max(0, (e - t.top) / s)), H = Math.min(t.bottom, e) - Math.max(t.top - B, 0), L = Math.min(1, Math.max(0, H / e)), D = Math.max(0, Math.round(t.bottom - e));
|
|
719
|
+
!k && p && n.onEnter && n.onEnter(), !A && h && n.onExit && n.onExit(), k = p, A = h, i = o, n.onProgress && n.onProgress({ scrollProgress: u, adExposure: T, viewportCoverage: L, pxRemaining: D }), (n.thresholds || []).forEach((z, W) => {
|
|
720
|
+
const O = m[W], F = u >= z.at;
|
|
721
|
+
!O && F ? (m[W] = !0, z.onEnter && z.onEnter(u)) : O && !F && (m[W] = !1, z.onLeave && z.onLeave(u));
|
|
722
722
|
});
|
|
723
|
-
const
|
|
724
|
-
if (
|
|
725
|
-
const z =
|
|
726
|
-
if (!
|
|
727
|
-
const W = 1 + Math.max(0, z +
|
|
728
|
-
|
|
729
|
-
} else !
|
|
730
|
-
} else
|
|
731
|
-
const $ =
|
|
732
|
-
|
|
723
|
+
const R = e;
|
|
724
|
+
if (S && t.top <= R + n.stretchOverlap && !h) {
|
|
725
|
+
const z = R - t.top;
|
|
726
|
+
if (!g && z <= d - n.snapOverlap) {
|
|
727
|
+
const W = 1 + Math.max(0, z + n.stretchOverlap) / B;
|
|
728
|
+
S.style.transition = "none", S.style.transform = `scaleY(${W})`;
|
|
729
|
+
} else !g && z > d - n.snapOverlap && (g = !0, S.style.transition = `transform ${n.snapDuration}s ${n.snapEase}`, S.style.transform = "scaleY(1)");
|
|
730
|
+
} else S && t.top > R + n.stretchOverlap && (g = !1, S.style.transition = "none", S.style.transform = "scaleY(1)");
|
|
731
|
+
const $ = l.visualViewport ? Math.round(l.innerHeight - (l.visualViewport.offsetTop + l.visualViewport.height)) : 0;
|
|
732
|
+
h ? (y.style.transition = "none", y.style.transform = "none", y.style.position = "sticky", y.style.top = "0", y.style.bottom = "", y.style.left = "", y.style.marginLeft = "calc(50% - 50vw)", y.style.width = "100vw", b && (b.textContent = n.labelBottomNow), P && (P.style.width = "100%")) : o ? (b && (b.textContent = D > 0 ? E < 0.2 ? n.labelBottomResume : E < 0.75 ? n.labelBottomMid : n.labelBottomLate : n.labelBottomNow), P && (P.style.width = `${Math.round(E * 100)}%`), y.style.transition = "transform 0.3s ease", y.style.transform = "translateY(0)", y.style.position = "fixed", y.style.bottom = `${$}px`, y.style.top = "", y.style.left = "0", y.style.marginLeft = "0", y.style.width = "100vw") : (y.style.transition = "transform 0.3s ease", y.style.transform = "translateY(100%)", y.style.position = "fixed", y.style.bottom = `${$}px`, y.style.left = "0", y.style.marginLeft = "0", y.style.width = "100vw");
|
|
733
733
|
};
|
|
734
|
-
return
|
|
735
|
-
|
|
736
|
-
t.style[
|
|
734
|
+
return w(), l.addEventListener("scroll", w, { passive: !0 }), l.visualViewport?.addEventListener("resize", w, { passive: !0 }), () => {
|
|
735
|
+
l.removeEventListener("scroll", w), l.visualViewport?.removeEventListener("resize", w), M ? M.remove() : S && S.remove(), y && y.remove(), f ? r.setAttribute("style", f) : r.removeAttribute("style"), q ? c.setAttribute("style", q) : c.removeAttribute("style"), v.forEach(({ el: t, prop: e, val: p }) => {
|
|
736
|
+
t.style[e] = p || "";
|
|
737
737
|
});
|
|
738
738
|
};
|
|
739
|
-
}, J = (
|
|
740
|
-
const
|
|
739
|
+
}, J = (x = {}) => {
|
|
740
|
+
const n = {
|
|
741
741
|
// Adaptation dimensions
|
|
742
742
|
adaptToWidth: "100%",
|
|
743
743
|
// target width — '100%' | '100vw' | px string | false
|
|
@@ -752,122 +752,122 @@ const V = (A) => {
|
|
|
752
752
|
// Callback — fired once the slot dimensions have settled
|
|
753
753
|
onAdapt: null,
|
|
754
754
|
// Merge caller-supplied options
|
|
755
|
-
...
|
|
756
|
-
},
|
|
757
|
-
if (!
|
|
755
|
+
...x
|
|
756
|
+
}, c = window.frameElement ?? null;
|
|
757
|
+
if (!c) return () => {
|
|
758
758
|
};
|
|
759
|
-
const
|
|
760
|
-
if (!
|
|
759
|
+
const l = window.parent;
|
|
760
|
+
if (!l || l === window) return () => {
|
|
761
761
|
};
|
|
762
|
-
let
|
|
762
|
+
let a = null;
|
|
763
763
|
try {
|
|
764
|
-
|
|
764
|
+
a = l.document, l.location.href;
|
|
765
765
|
} catch {
|
|
766
766
|
return () => {
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
769
|
const r = (() => {
|
|
770
|
-
const
|
|
771
|
-
if (
|
|
772
|
-
let
|
|
773
|
-
for (;
|
|
774
|
-
if (
|
|
775
|
-
|
|
770
|
+
const d = a.querySelector("#adspot-mobile-mbanner-2-above");
|
|
771
|
+
if (d) return d;
|
|
772
|
+
let g = c.parentElement;
|
|
773
|
+
for (; g && g !== a.body; ) {
|
|
774
|
+
if (g.id && g.id.includes("adspot")) return g;
|
|
775
|
+
g = g.parentElement;
|
|
776
776
|
}
|
|
777
|
-
return
|
|
777
|
+
return c.parentElement;
|
|
778
778
|
})();
|
|
779
779
|
if (!r) return () => {
|
|
780
780
|
};
|
|
781
|
-
const f = r.getAttribute("style"), q =
|
|
782
|
-
const
|
|
783
|
-
if (
|
|
784
|
-
const
|
|
785
|
-
|
|
781
|
+
const f = r.getAttribute("style"), q = c.getAttribute("style"), v = c.parentElement !== r ? c.parentElement : null, N = v ? v.getAttribute("style") : null, I = r.parentElement, S = I ? l.getComputedStyle(I).paddingTop : null, M = parseInt(c.getAttribute("width"), 10) || 320, y = parseInt(c.getAttribute("height"), 10) || 50, b = () => {
|
|
782
|
+
const d = r.style;
|
|
783
|
+
if (d.position = "relative", d.overflow = "visible", d.boxSizing = "border-box", r.setAttribute("poweredAC", "0.1.3"), v) {
|
|
784
|
+
const k = v.style;
|
|
785
|
+
k.width = "100%", k.height = "100%", k.margin = "0", k.textAlign = "left";
|
|
786
786
|
}
|
|
787
|
-
const
|
|
788
|
-
|
|
787
|
+
const g = c.style;
|
|
788
|
+
g.display = "block", g.width = "100%", g.height = "100%", g.border = "none", g.margin = "0", g.padding = "0";
|
|
789
789
|
}, P = () => {
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
const
|
|
793
|
-
r.style.height =
|
|
794
|
-
}) : (
|
|
790
|
+
const d = r.style;
|
|
791
|
+
d.zIndex = String(n.zIndex), n.adaptToWidth && (d.width = n.adaptToWidth, d.maxWidth = n.maxWidth || n.adaptToWidth, n.maxWidth && n.adaptToWidth !== "100vw" && !n.adaptToWidth.endsWith("vw") ? (d.marginLeft = "auto", d.marginRight = "auto") : (n.adaptToWidth === "100vw" || n.adaptToWidth.endsWith("vw")) && (d.marginLeft = "calc(50% - 50vw)", d.marginRight = "0")), I && S && S !== "0px" && (I.style.paddingTop = "0"), n.maintainAspectRatio ? l.requestAnimationFrame(() => {
|
|
792
|
+
const k = r.offsetWidth || M, i = Math.round(k * (y / M));
|
|
793
|
+
r.style.height = i + "px", v && (v.style.height = i + "px"), c.style.height = i + "px", n.onAdapt && n.onAdapt();
|
|
794
|
+
}) : (n.adaptToHeight && (d.height = n.adaptToHeight), n.onAdapt && n.onAdapt());
|
|
795
795
|
};
|
|
796
|
-
return
|
|
797
|
-
f ? r.setAttribute("style", f) : r.removeAttribute("style"), q ?
|
|
796
|
+
return b(), P(), () => {
|
|
797
|
+
f ? r.setAttribute("style", f) : r.removeAttribute("style"), q ? c.setAttribute("style", q) : c.removeAttribute("style"), v && (N ? v.setAttribute("style", N) : v.removeAttribute("style")), I && S && S !== "0px" && (I.style.paddingTop = S);
|
|
798
798
|
};
|
|
799
|
-
}, Q = (
|
|
800
|
-
const
|
|
799
|
+
}, Q = (x = {}) => {
|
|
800
|
+
const n = {
|
|
801
801
|
billboardHeight: 150,
|
|
802
802
|
sideStripWidth: 10,
|
|
803
803
|
zIndex: 0,
|
|
804
804
|
onAdapt: null,
|
|
805
|
-
...
|
|
806
|
-
},
|
|
807
|
-
if (!
|
|
805
|
+
...x
|
|
806
|
+
}, c = window.frameElement ?? null;
|
|
807
|
+
if (!c) return () => {
|
|
808
808
|
};
|
|
809
|
-
const
|
|
810
|
-
if (!
|
|
809
|
+
const l = window.parent;
|
|
810
|
+
if (!l || l === window) return () => {
|
|
811
811
|
};
|
|
812
|
-
let
|
|
812
|
+
let a = null;
|
|
813
813
|
try {
|
|
814
|
-
|
|
814
|
+
a = l.document, l.location.href;
|
|
815
815
|
} catch {
|
|
816
816
|
return () => {
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
819
|
const r = (() => {
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
822
|
-
let
|
|
823
|
-
for (;
|
|
824
|
-
if (
|
|
825
|
-
|
|
820
|
+
const t = a.querySelector("#adspot-mobile-mbanner-2-above");
|
|
821
|
+
if (t) return t;
|
|
822
|
+
let e = c.parentElement;
|
|
823
|
+
for (; e && e !== a.body; ) {
|
|
824
|
+
if (e.id && e.id.includes("adspot")) return e;
|
|
825
|
+
e = e.parentElement;
|
|
826
826
|
}
|
|
827
|
-
return
|
|
827
|
+
return c.parentElement;
|
|
828
828
|
})();
|
|
829
829
|
if (!r) return () => {
|
|
830
830
|
};
|
|
831
831
|
const f = {
|
|
832
832
|
nine: {
|
|
833
833
|
siteBackgroundColor: "#ffffff",
|
|
834
|
-
setup(
|
|
835
|
-
|
|
836
|
-
const
|
|
837
|
-
|
|
834
|
+
setup(t, e) {
|
|
835
|
+
t.querySelector("main")?.style.setProperty("position", "relative");
|
|
836
|
+
const p = e?.parentElement?.nextElementSibling;
|
|
837
|
+
p && p.tagName !== "HEADER" && (p.style.paddingTop = "0px");
|
|
838
838
|
}
|
|
839
839
|
},
|
|
840
840
|
wwos: {
|
|
841
841
|
siteBackgroundColor: "#ffffff",
|
|
842
|
-
setup(
|
|
843
|
-
|
|
844
|
-
const
|
|
845
|
-
|
|
842
|
+
setup(t, e) {
|
|
843
|
+
t.querySelector("main")?.style.setProperty("position", "relative");
|
|
844
|
+
const p = e?.parentElement?.nextElementSibling;
|
|
845
|
+
p && p.tagName !== "HEADER" && (p.style.paddingTop = "0px");
|
|
846
846
|
}
|
|
847
847
|
},
|
|
848
848
|
nineNews: {
|
|
849
849
|
siteBackgroundColor: "#ffffff",
|
|
850
|
-
setup(
|
|
851
|
-
const
|
|
852
|
-
|
|
850
|
+
setup(t) {
|
|
851
|
+
const e = t.querySelector(".layout");
|
|
852
|
+
e && (e.style.backgroundColor = "transparent"), t.querySelector(".content")?.style.setProperty("position", "relative");
|
|
853
853
|
}
|
|
854
854
|
},
|
|
855
855
|
lifestyle: {
|
|
856
856
|
siteBackgroundColor: "#ffffff",
|
|
857
|
-
setup(
|
|
858
|
-
|
|
857
|
+
setup(t) {
|
|
858
|
+
t.querySelector("main")?.style.setProperty("position", "relative");
|
|
859
859
|
}
|
|
860
860
|
},
|
|
861
861
|
smh: {
|
|
862
862
|
siteBackgroundColor: "#ffffff",
|
|
863
|
-
setup(
|
|
864
|
-
|
|
863
|
+
setup(t) {
|
|
864
|
+
t.querySelector("main")?.style.setProperty("position", "relative");
|
|
865
865
|
}
|
|
866
866
|
},
|
|
867
867
|
theage: {
|
|
868
868
|
siteBackgroundColor: "#ffffff",
|
|
869
|
-
setup(
|
|
870
|
-
|
|
869
|
+
setup(t) {
|
|
870
|
+
t.querySelector("main")?.style.setProperty("position", "relative");
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
}, q = [
|
|
@@ -883,27 +883,27 @@ const V = (A) => {
|
|
|
883
883
|
{ site: "https://www.theage", config: f.theage },
|
|
884
884
|
{ site: "https://creative-preview-an.com", config: f.nine }
|
|
885
885
|
], N = (() => {
|
|
886
|
-
const
|
|
887
|
-
for (const
|
|
888
|
-
if (
|
|
886
|
+
const t = l.location.href;
|
|
887
|
+
for (const e of q)
|
|
888
|
+
if (t.indexOf(e.site) >= 0) return e.config;
|
|
889
889
|
return f.nine;
|
|
890
|
-
})(), I =
|
|
891
|
-
let
|
|
892
|
-
const
|
|
893
|
-
let
|
|
894
|
-
for (;
|
|
895
|
-
const
|
|
896
|
-
(
|
|
890
|
+
})(), I = c.getAttribute("style"), S = r.getAttribute("style"), M = c.parentElement !== r ? c.parentElement : null, y = M ? M.getAttribute("style") : null, b = r.parentElement, P = b ? b.getAttribute("style") : null;
|
|
891
|
+
let B = null, d = null;
|
|
892
|
+
const g = [], k = () => {
|
|
893
|
+
let t = c.parentElement;
|
|
894
|
+
for (; t && t !== a.body && t !== a.documentElement; ) {
|
|
895
|
+
const s = l.getComputedStyle(t);
|
|
896
|
+
(s.transform && s.transform !== "none" || s.willChange && s.willChange !== "auto" || s.contain && s.contain !== "none" || s.filter && s.filter !== "none" || s.perspective && s.perspective !== "none") && (g.push({ el: t, orig: t.getAttribute("style") }), t.style.transform = "none", t.style.willChange = "auto", t.style.contain = "none", t.style.filter = "none", t.style.perspective = "none"), s.overflow !== "visible" && (g.find((E) => E.el === t) || g.push({ el: t, orig: t.getAttribute("style") }), t.style.overflow = "visible"), t = t.parentElement;
|
|
897
897
|
}
|
|
898
|
-
const
|
|
899
|
-
if (
|
|
900
|
-
const
|
|
901
|
-
|
|
898
|
+
const e = c.style;
|
|
899
|
+
if (e.position = "fixed", e.top = "0", e.left = "0", e.width = "100vw", e.height = "100vh", e.zIndex = String(n.zIndex), e.border = "none", e.margin = "0", e.padding = "0", e.display = "block", r.setAttribute("poweredAC", "0.1.3"), M) {
|
|
900
|
+
const s = M.style;
|
|
901
|
+
s.width = "100%", s.height = "0", s.overflow = "visible", s.position = "static", s.margin = "0";
|
|
902
902
|
}
|
|
903
|
-
const
|
|
904
|
-
|
|
905
|
-
const
|
|
906
|
-
|
|
903
|
+
const p = r.style;
|
|
904
|
+
p.height = n.billboardHeight + "px", p.minHeight = n.billboardHeight + "px", p.background = "transparent", p.overflow = "visible", p.position = "relative", p.width = "100%", p.padding = "0", p.margin = "0", b && (b.style.overflow = "visible", b.style.position = "relative", b.style.backgroundColor = "transparent", b.style.height = n.billboardHeight + "px", b.style.minHeight = n.billboardHeight + "px", b.style.maxHeight = n.billboardHeight + "px", b.style.padding = "0", b.style.margin = "0", b.setAttribute("data-mf-slot", ""));
|
|
905
|
+
const h = `max(${n.sideStripWidth}px, env(safe-area-inset-left))`, o = `max(${n.sideStripWidth}px, env(safe-area-inset-right))`;
|
|
906
|
+
B = a.createElement("style"), B.id = "mobilefireplace-pac", B.textContent = `
|
|
907
907
|
/* Mobile Fireplace — powered-ad-config */
|
|
908
908
|
html, body {
|
|
909
909
|
background-color: transparent !important;
|
|
@@ -922,8 +922,8 @@ const V = (A) => {
|
|
|
922
922
|
position: relative;
|
|
923
923
|
z-index: 1;
|
|
924
924
|
background-color: ${N.siteBackgroundColor};
|
|
925
|
-
margin-left: ${
|
|
926
|
-
margin-right: ${
|
|
925
|
+
margin-left: ${h} !important;
|
|
926
|
+
margin-right: ${o} !important;
|
|
927
927
|
}
|
|
928
928
|
/* Header, nav and network nav stay full-width — no side margin, keep own background */
|
|
929
929
|
body > * > header,
|
|
@@ -949,36 +949,68 @@ const V = (A) => {
|
|
|
949
949
|
margin: 0 !important;
|
|
950
950
|
padding: 0 !important;
|
|
951
951
|
}
|
|
952
|
-
|
|
952
|
+
/* Billboard iframe — in-flow, no side margins */
|
|
953
|
+
[data-mf-billboard-iframe] {
|
|
954
|
+
background-color: transparent !important;
|
|
955
|
+
margin: 0 !important;
|
|
956
|
+
padding: 0 !important;
|
|
957
|
+
}
|
|
958
|
+
`, a.head.appendChild(B), N.setup && N.setup(a, r);
|
|
953
959
|
};
|
|
954
|
-
let
|
|
955
|
-
const
|
|
956
|
-
const
|
|
957
|
-
if (
|
|
958
|
-
const
|
|
959
|
-
r.style.height =
|
|
960
|
+
let A = null;
|
|
961
|
+
const i = () => {
|
|
962
|
+
const t = l.innerWidth, e = l.innerHeight;
|
|
963
|
+
if (t > e) {
|
|
964
|
+
const p = e / t, h = Math.round(n.billboardHeight * p);
|
|
965
|
+
r.style.height = h + "px", r.style.minHeight = h + "px", d && (d.style.height = h + "px");
|
|
960
966
|
} else
|
|
961
|
-
r.style.height =
|
|
967
|
+
r.style.height = n.billboardHeight + "px", r.style.minHeight = n.billboardHeight + "px", d && (d.style.height = n.billboardHeight + "px");
|
|
962
968
|
};
|
|
963
|
-
|
|
964
|
-
|
|
969
|
+
k();
|
|
970
|
+
const m = c.src || "";
|
|
971
|
+
if (m && m !== "about:blank")
|
|
972
|
+
try {
|
|
973
|
+
const t = new URL(m);
|
|
974
|
+
t.searchParams.set("mfRole", "billboard"), d = a.createElement("iframe"), d.src = t.href, d.setAttribute("data-mf-billboard-iframe", ""), d.setAttribute("scrolling", "no"), d.setAttribute("frameborder", "0");
|
|
975
|
+
const e = d.style;
|
|
976
|
+
e.position = "relative", e.width = "100%", e.height = n.billboardHeight + "px", e.border = "none", e.margin = "0", e.padding = "0", e.display = "block", e.overflow = "hidden", e.background = "transparent", e.zIndex = "1", r.appendChild(d);
|
|
977
|
+
} catch (t) {
|
|
978
|
+
console.warn("[mobilefireplace] Could not create billboard iframe:", t);
|
|
979
|
+
}
|
|
980
|
+
return l.__mfBridge = {
|
|
981
|
+
adapted: !1,
|
|
982
|
+
wallpaperWindow: c.contentWindow,
|
|
983
|
+
billboardIframe: d,
|
|
984
|
+
billboardWindow: null
|
|
985
|
+
}, d && d.addEventListener("load", () => {
|
|
986
|
+
try {
|
|
987
|
+
l.__mfBridge.billboardWindow = d.contentWindow;
|
|
988
|
+
} catch {
|
|
989
|
+
}
|
|
990
|
+
}), A = i, l.addEventListener("resize", A), i(), n.onAdapt && l.requestAnimationFrame(() => {
|
|
991
|
+
l.__mfBridge.adapted = !0, n.onAdapt();
|
|
965
992
|
}), () => {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
993
|
+
A && (l.removeEventListener("resize", A), A = null), B && B.parentNode && (B.parentNode.removeChild(B), B = null), d && d.parentNode && (d.parentNode.removeChild(d), d = null);
|
|
994
|
+
try {
|
|
995
|
+
delete l.__mfBridge;
|
|
996
|
+
} catch {
|
|
997
|
+
}
|
|
998
|
+
I ? c.setAttribute("style", I) : c.removeAttribute("style");
|
|
999
|
+
for (const { el: t, orig: e } of g)
|
|
1000
|
+
e ? t.setAttribute("style", e) : t.removeAttribute("style");
|
|
1001
|
+
g.length = 0, S ? r.setAttribute("style", S) : r.removeAttribute("style"), M && (y ? M.setAttribute("style", y) : M.removeAttribute("style")), b && (b.removeAttribute("data-mf-slot"), P ? b.setAttribute("style", P) : b.removeAttribute("style"));
|
|
970
1002
|
};
|
|
971
1003
|
};
|
|
972
|
-
let
|
|
1004
|
+
let _ = () => {
|
|
973
1005
|
};
|
|
974
|
-
function Z({ adFormat:
|
|
975
|
-
typeof
|
|
1006
|
+
function Z({ adFormat: x = "", stickyOffset: n = 0, logoPosX: c = 0, logoHeight: l = 0, logoSmallHeight: a = 0, ...C } = {}) {
|
|
1007
|
+
typeof _ == "function" && _();
|
|
976
1008
|
let r = () => {
|
|
977
1009
|
};
|
|
978
|
-
return
|
|
979
|
-
},
|
|
1010
|
+
return x === "fireplace" ? r = V(n) : x === "fireplace-collant" ? r = Y(n) : x === "logomorph" ? r = U(c, l, a) : x === "interscroller" ? r = K(C) : x === "liquidframe" ? r = J(C) : x === "mobilefireplace" ? r = Q(C) : console.warn("[powered-ad-config] Unknown ad format:", x), _ = typeof r == "function" ? r : () => {
|
|
1011
|
+
}, _;
|
|
980
1012
|
}
|
|
981
|
-
Z.version = "0.1.
|
|
1013
|
+
Z.version = "0.1.3";
|
|
982
1014
|
export {
|
|
983
1015
|
Z as default
|
|
984
1016
|
};
|