powered-ad-config 0.1.0 → 0.1.2
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 +498 -326
- package/dist/powered-ad-config.umd.js +53 -7
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const V = (
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
1
|
+
const V = (A) => {
|
|
2
|
+
const i = window.frameElement ? window.frameElement : null;
|
|
3
|
+
if (!i) return () => {
|
|
4
4
|
};
|
|
5
|
-
const
|
|
6
|
-
if (!
|
|
5
|
+
const p = window.parent;
|
|
6
|
+
if (!p || p === window) return () => {
|
|
7
7
|
};
|
|
8
8
|
let a = null;
|
|
9
9
|
try {
|
|
10
|
-
a =
|
|
10
|
+
a = p.document, p.location.href;
|
|
11
11
|
} catch {
|
|
12
12
|
return () => {
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const c = {
|
|
16
16
|
siteBackgroundColor: "#ffffff",
|
|
17
17
|
fireplaceLeftMargin: 0,
|
|
18
18
|
adNodeMarginTop: -24,
|
|
@@ -22,10 +22,10 @@ const V = (S) => {
|
|
|
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, s = (l, t) => l.forEach((n) => t.forEach(([g, u]) => n.style[g] = u));
|
|
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"), s(o.querySelectorAll(".column"), [["position", "relative"]]), s(o.querySelectorAll(".advert"), [["position", "relative"]]), s(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
|
+
}, k = {
|
|
29
29
|
siteBackgroundColor: "#ffffff",
|
|
30
30
|
fireplaceLeftMargin: 0,
|
|
31
31
|
adNodeMarginTop: -24,
|
|
@@ -35,8 +35,8 @@ const V = (S) => {
|
|
|
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, s = (l, t) => l.forEach((n) => t.forEach(([g, u]) => n.style[g] = u));
|
|
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"), 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");
|
|
40
40
|
}
|
|
41
41
|
}, r = {
|
|
42
42
|
siteBackgroundColor: "#ffffff",
|
|
@@ -50,12 +50,12 @@ const V = (S) => {
|
|
|
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 l = o.createElement("style");
|
|
54
|
+
l.innerHTML = `
|
|
55
55
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
56
56
|
position: static;
|
|
57
57
|
}
|
|
58
|
-
`, o.head.appendChild(
|
|
58
|
+
`, o.head.appendChild(l);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}, f = {
|
|
@@ -68,17 +68,17 @@ const V = (S) => {
|
|
|
68
68
|
yPosHalfpage: 32,
|
|
69
69
|
stickyMargin: { offset: 104, isSticky: !0 },
|
|
70
70
|
zIndex: function() {
|
|
71
|
-
const o = window.parent.document,
|
|
72
|
-
if (
|
|
73
|
-
let
|
|
74
|
-
|
|
71
|
+
const o = window.parent.document, l = o.querySelector("footer").previousElementSibling;
|
|
72
|
+
if (l && l.tagName.toLowerCase() === "div" && (l.style.position = "relative"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
73
|
+
let n = o.createElement("style");
|
|
74
|
+
n.innerHTML = `
|
|
75
75
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
76
76
|
position: static;
|
|
77
77
|
}
|
|
78
|
-
`, o.head.appendChild(
|
|
78
|
+
`, o.head.appendChild(n);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, q = {
|
|
82
82
|
siteBackgroundColor: "#f7f7f7",
|
|
83
83
|
fireplaceLeftMargin: 0,
|
|
84
84
|
adNodeMarginTop: -25,
|
|
@@ -88,8 +88,8 @@ const V = (S) => {
|
|
|
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, s = (t, n) => t.forEach((g) => n.forEach(([u, e]) => g.style[u] = e));
|
|
92
|
+
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('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 V = (S) => {
|
|
|
98
98
|
`, o.head.appendChild(t);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, b = {
|
|
102
102
|
siteBackgroundColor: "#ffffff",
|
|
103
103
|
fireplaceLeftMargin: 0,
|
|
104
104
|
adNodeMarginTop: -32,
|
|
@@ -111,82 +111,82 @@ const V = (S) => {
|
|
|
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
|
-
},
|
|
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: k },
|
|
117
|
+
{ site: "https://www.nine.com.au/property", config: k },
|
|
118
|
+
{ site: "https://www.nine.com.au/entertainment", config: k },
|
|
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: k },
|
|
121
|
+
{ site: "https://staging.nine.com.au/property", config: k },
|
|
122
|
+
{ site: "https://staging.nine.com.au/entertainment", config: k },
|
|
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:
|
|
137
|
-
{ site: "https://wwos", config:
|
|
128
|
+
{ site: "https://entertainment", config: c },
|
|
129
|
+
{ site: "https://celebrity", config: c },
|
|
130
|
+
{ site: "https://homes", config: c },
|
|
131
|
+
{ site: "https://travel", config: c },
|
|
132
|
+
{ site: "https://honey", config: c },
|
|
133
|
+
{ site: "https://style", config: c },
|
|
134
|
+
{ site: "https://coach", config: c },
|
|
135
|
+
{ site: "https://kitchen", config: c },
|
|
136
|
+
{ site: "https://finance", config: c },
|
|
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:
|
|
145
|
-
],
|
|
139
|
+
{ site: "https://www.9news", config: b },
|
|
140
|
+
{ site: "https://staging.9news", config: b },
|
|
141
|
+
{ site: "https://www.yourtv", config: c },
|
|
142
|
+
{ site: "https://staging.yourtv", config: c },
|
|
143
|
+
{ site: "https://9now", config: k },
|
|
144
|
+
{ site: "https://creative-preview-an.com", config: c }
|
|
145
|
+
], I = () => {
|
|
146
146
|
const o = window.document.getElementById("nineContent");
|
|
147
|
-
o && (o.style.backgroundColor =
|
|
148
|
-
},
|
|
147
|
+
o && (o.style.backgroundColor = m.siteBackgroundColor), w(), h(), p.addEventListener("scroll", P), v = setTimeout(P, 50);
|
|
148
|
+
}, x = () => {
|
|
149
149
|
let o = null;
|
|
150
150
|
return o = a.querySelector('div[id*="billboard"][id*="above"]'), o;
|
|
151
|
-
},
|
|
152
|
-
const o =
|
|
153
|
-
for (let
|
|
154
|
-
if (o.indexOf(
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
-
if (!
|
|
158
|
-
const o =
|
|
151
|
+
}, M = () => {
|
|
152
|
+
const o = p.location.href;
|
|
153
|
+
for (let s = 0; s < N.length; s += 1)
|
|
154
|
+
if (o.indexOf(N[s].site) >= 0)
|
|
155
|
+
return N[s].config;
|
|
156
|
+
}, h = () => {
|
|
157
|
+
if (!i) return;
|
|
158
|
+
const o = i.style;
|
|
159
159
|
o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.transform = "translate(-50%, 0)";
|
|
160
|
+
}, w = () => {
|
|
161
|
+
if (!E) return;
|
|
162
|
+
const o = E.style;
|
|
163
|
+
E.className = "", o.minHeight = "250px", o.marginTop = m.adNodeMarginTop + "px", o.marginBottom = m.adNodeMarginBottom + "px", o.position = "static", o.display = "block", m.zIndex && m.zIndex();
|
|
160
164
|
}, P = () => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const o = c.scrollY, m = n.style, w = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
166
|
-
o >= 0 && o <= A ? (m.transform = `translate(-50%, ${-o}px)`, w.transform = "translateY(0)") : o > A && o <= k ? (m.transform = `translate(-50%, ${-A}px)`, w.transform = `translateY(${A - o}px)`) : o > k && (m.transform = `translate(-50%, ${-A}px)`, w.transform = "translateY(-250px)");
|
|
167
|
-
}, I = b(), y = T();
|
|
168
|
-
if (!y) return () => {
|
|
165
|
+
const o = p.scrollY, s = i.style, l = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
166
|
+
o >= 0 && o <= S ? (s.transform = `translate(-50%, ${-o}px)`, l.transform = "translateY(0)") : o > S && o <= C ? (s.transform = `translate(-50%, ${-S}px)`, l.transform = `translateY(${S - o}px)`) : o > C && (s.transform = `translate(-50%, ${-S}px)`, l.transform = "translateY(-250px)");
|
|
167
|
+
}, E = x(), m = M();
|
|
168
|
+
if (!m) return () => {
|
|
169
169
|
};
|
|
170
|
-
let
|
|
171
|
-
const
|
|
172
|
-
return
|
|
173
|
-
|
|
170
|
+
let v = null;
|
|
171
|
+
const S = -m.responsiveScroll + A, C = S + 250;
|
|
172
|
+
return I(), () => {
|
|
173
|
+
p.removeEventListener("scroll", P), v && (clearTimeout(v), v = null);
|
|
174
174
|
};
|
|
175
|
-
}, Y = (
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
175
|
+
}, Y = (A) => {
|
|
176
|
+
const i = window.frameElement ? window.frameElement : null;
|
|
177
|
+
if (!i) return () => {
|
|
178
178
|
};
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
179
|
+
const p = window.parent;
|
|
180
|
+
if (!p || p === window) return () => {
|
|
181
181
|
};
|
|
182
182
|
let a = null;
|
|
183
183
|
try {
|
|
184
|
-
a =
|
|
184
|
+
a = p.document, p.location.href;
|
|
185
185
|
} catch {
|
|
186
186
|
return () => {
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
const
|
|
189
|
+
const c = document.getElementById("nineMasthead"), k = c ? c.style : {};
|
|
190
190
|
let r;
|
|
191
191
|
const f = {
|
|
192
192
|
siteBackgroundColor: "#ffffff",
|
|
@@ -199,10 +199,10 @@ const V = (S) => {
|
|
|
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, d = (y, B) => y.forEach((T) => B.forEach(([H, L]) => T.style[H] = 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"), d(e.querySelectorAll(".column"), [["position", "relative"]]), d(e.querySelectorAll(".advert"), [["position", "relative"]]), d(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
|
+
}, q = {
|
|
206
206
|
siteBackgroundColor: "#ffffff",
|
|
207
207
|
fireplaceLeftMargin: 0,
|
|
208
208
|
adNodeMarginTop: -24,
|
|
@@ -213,10 +213,10 @@ const V = (S) => {
|
|
|
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, d = (y, B) => y.forEach((T) => B.forEach(([H, L]) => T.style[H] = 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"), d(e.querySelectorAll(".column"), [["position", "relative"]]), d(e.querySelectorAll(".advert"), [["position", "relative"]]), d(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
|
+
}, b = {
|
|
220
220
|
siteBackgroundColor: "#ffffff",
|
|
221
221
|
fireplaceLeftMargin: 0,
|
|
222
222
|
adNodeMarginTop: -24,
|
|
@@ -229,15 +229,15 @@ const V = (S) => {
|
|
|
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 y = e.createElement("style");
|
|
233
|
+
y.innerHTML = `
|
|
234
234
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
235
235
|
position: static;
|
|
236
236
|
}
|
|
237
|
-
`, e.head.appendChild(
|
|
237
|
+
`, e.head.appendChild(y);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
},
|
|
240
|
+
}, N = {
|
|
241
241
|
siteBackgroundColor: "#ffffff",
|
|
242
242
|
fireplaceLeftMargin: 0,
|
|
243
243
|
adNodeMarginTop: -24,
|
|
@@ -248,17 +248,17 @@ const V = (S) => {
|
|
|
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, y = e.querySelector("footer").previousElementSibling;
|
|
252
|
+
if (y && y.tagName.toLowerCase() === "div" && (y.style.position = "relative"), e.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
253
|
+
let T = e.createElement("style");
|
|
254
|
+
T.innerHTML = `
|
|
255
255
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
256
256
|
position: static;
|
|
257
257
|
}
|
|
258
|
-
`, e.head.appendChild(
|
|
258
|
+
`, e.head.appendChild(T);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, I = {
|
|
262
262
|
siteBackgroundColor: "#ffffff",
|
|
263
263
|
fireplaceLeftMargin: 0,
|
|
264
264
|
adNodeMarginTop: -25,
|
|
@@ -269,17 +269,17 @@ const V = (S) => {
|
|
|
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, d = (B, T) => B.forEach((H) => T.forEach(([L, D]) => H.style[L] = D));
|
|
273
|
+
if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), d(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 B = e.createElement("style");
|
|
275
|
+
B.innerHTML = `
|
|
276
276
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
277
277
|
position: static;
|
|
278
278
|
}
|
|
279
|
-
`, e.head.appendChild(
|
|
279
|
+
`, e.head.appendChild(B);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, x = {
|
|
283
283
|
siteBackgroundColor: "#ffffff",
|
|
284
284
|
fireplaceLeftMargin: 0,
|
|
285
285
|
adNodeMarginTop: -32,
|
|
@@ -292,23 +292,23 @@ const V = (S) => {
|
|
|
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 d = e.querySelector('[class*="VideoIndexComponent"]');
|
|
296
|
+
d && (e.querySelector(".breadcrumbs")?.setAttribute("style", "display:none"), d.style.maxWidth = "1190px", d.style.margin = "auto", d.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:
|
|
298
|
+
}, M = [
|
|
299
|
+
{ site: "https://www.nine.com.au/sport", config: N },
|
|
300
|
+
{ site: "https://www.nine.com.au/product-reviews", config: q },
|
|
301
|
+
{ site: "https://www.nine.com.au/property", config: q },
|
|
302
|
+
{ site: "https://www.nine.com.au/entertainment", config: q },
|
|
303
|
+
{ site: "https://staging.nine.com.au/sport", config: N },
|
|
304
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: q },
|
|
305
|
+
{ site: "https://staging.nine.com.au/property", config: q },
|
|
306
|
+
{ site: "https://staging.nine.com.au/entertainment", config: q },
|
|
307
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: b },
|
|
308
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: b },
|
|
309
|
+
{ site: "https://preview.nine.com.au/", config: b },
|
|
310
|
+
{ site: "https://www.nine", config: b },
|
|
311
|
+
{ site: "https://staging.nine", config: b },
|
|
312
312
|
{ site: "https://entertainment", config: f },
|
|
313
313
|
{ site: "https://celebrity", config: f },
|
|
314
314
|
{ site: "https://homes", config: f },
|
|
@@ -318,77 +318,77 @@ const V = (S) => {
|
|
|
318
318
|
{ site: "https://coach", config: f },
|
|
319
319
|
{ site: "https://kitchen", config: f },
|
|
320
320
|
{ site: "https://finance", config: f },
|
|
321
|
-
{ site: "https://wwos", config:
|
|
322
|
-
{ site: "https://staging.wwos", config:
|
|
323
|
-
{ site: "https://www.9news", config:
|
|
324
|
-
{ site: "https://staging.9news", config:
|
|
321
|
+
{ site: "https://wwos", config: I },
|
|
322
|
+
{ site: "https://staging.wwos", config: N },
|
|
323
|
+
{ site: "https://www.9news", config: x },
|
|
324
|
+
{ site: "https://staging.9news", config: x },
|
|
325
325
|
{ site: "https://www.yourtv", config: f },
|
|
326
326
|
{ site: "https://staging.yourtv", config: f },
|
|
327
|
-
{ site: "https://9now", config:
|
|
327
|
+
{ site: "https://9now", config: q },
|
|
328
328
|
{ site: "https://creative-preview-an.com", config: f }
|
|
329
|
-
],
|
|
329
|
+
], h = () => {
|
|
330
330
|
const e = window.document.getElementById("nineContent");
|
|
331
|
-
e && (e.style.backgroundColor = t.siteBackgroundColor),
|
|
332
|
-
},
|
|
331
|
+
e && (e.style.backgroundColor = t.siteBackgroundColor), c && (k.setProperty("--masthead-height", "250px"), k.height = "var(--masthead-height)"), v(), m(), P(), S(), p.addEventListener("scroll", s, { passive: !0 }), n = setTimeout(s, 50);
|
|
332
|
+
}, w = () => {
|
|
333
333
|
let e = null;
|
|
334
334
|
return e = a.querySelector('div[id*="billboard"][id*="above"]'), e;
|
|
335
|
-
},
|
|
335
|
+
}, P = () => {
|
|
336
336
|
let e = null;
|
|
337
337
|
if (!window.parent) return e;
|
|
338
338
|
if (e = a.querySelector('div[id*="halfpage"][id*="above"]'), !e) return;
|
|
339
|
-
let
|
|
340
|
-
for (let
|
|
341
|
-
if (
|
|
342
|
-
|
|
339
|
+
let d = e;
|
|
340
|
+
for (let y = 0; y < 3; y++)
|
|
341
|
+
if (d = d.parentNode, d && getComputedStyle(d).position === "sticky") {
|
|
342
|
+
d.setAttribute("style", `top: ${t.stickyMargin.offset}px`);
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
|
-
},
|
|
346
|
-
const e =
|
|
347
|
-
for (let
|
|
348
|
-
if (e.indexOf(
|
|
349
|
-
return
|
|
350
|
-
},
|
|
351
|
-
if (!
|
|
352
|
-
const e =
|
|
345
|
+
}, E = () => {
|
|
346
|
+
const e = p.location.href;
|
|
347
|
+
for (let d = 0; d < M.length; d += 1)
|
|
348
|
+
if (e.indexOf(M[d].site) >= 0)
|
|
349
|
+
return M[d].config;
|
|
350
|
+
}, m = () => {
|
|
351
|
+
if (!i) return;
|
|
352
|
+
const e = i.style;
|
|
353
353
|
e.width = "100%", e.height = "1000px", e.position = "fixed", e.left = "50%", e.setProperty("--transform-y", "0px"), e.transform = "translate3d(-50%, var(--transform-y), 0)";
|
|
354
|
-
},
|
|
355
|
-
if (!
|
|
356
|
-
const e =
|
|
357
|
-
|
|
358
|
-
},
|
|
354
|
+
}, v = () => {
|
|
355
|
+
if (!l) return;
|
|
356
|
+
const e = l.style;
|
|
357
|
+
l.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
|
+
}, S = () => {
|
|
359
359
|
r = a.querySelector('div[data-contentunit-id="stan"]')?.parentNode || a.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode || a.querySelector('div[class*="__MyContainer"]') || a.querySelector('div[class*="__ArticleContainer"]') || a.querySelector('div[class*="__VideoIndexComponent"]') || a.querySelector("div.container.layout") || a.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 e =
|
|
361
|
+
let C = 0, o = 0;
|
|
362
|
+
const s = () => {
|
|
363
|
+
const e = p.scrollY, d = e > C, y = e > u ? e - t.maskOffset : 0, B = Math.abs(y - o);
|
|
364
364
|
if (r)
|
|
365
|
-
if (
|
|
366
|
-
if (
|
|
367
|
-
const
|
|
368
|
-
r.style.transition = "none", r.style.setProperty("--mask-inset", `${
|
|
365
|
+
if (d && y > o)
|
|
366
|
+
if (B > 100) {
|
|
367
|
+
const T = Math.max(0, y - 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", `${y}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", `${y}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", `${y}px`);
|
|
373
|
+
C = e, o = y, e > u ? (i.style.setProperty("--transform-y", `${-g}px`), k.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : e > g && e <= u ? (i.style.setProperty("--transform-y", `${-g}px`), k.setProperty("--masthead-height", `${250 + g - e}px`), window.CollantOn && window.goBillboard()) : e >= 0 && e <= g && (i.style.setProperty("--transform-y", `${-e}px`), k.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
|
|
374
|
+
}, l = w(), t = E();
|
|
375
375
|
if (!t) return () => {
|
|
376
376
|
};
|
|
377
|
-
let
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
|
|
377
|
+
let n = null;
|
|
378
|
+
const g = -t.responsiveScroll + A, u = g + 150;
|
|
379
|
+
return h(), () => {
|
|
380
|
+
p.removeEventListener("scroll", s), n && (clearTimeout(n), n = null);
|
|
381
381
|
};
|
|
382
|
-
}, X = (
|
|
382
|
+
}, X = (A, i, p) => {
|
|
383
383
|
const a = window.frameElement ? window.frameElement : null;
|
|
384
384
|
if (!a) return () => {
|
|
385
385
|
};
|
|
386
|
-
const
|
|
387
|
-
if (!
|
|
386
|
+
const c = window.parent;
|
|
387
|
+
if (!c || c === window) return () => {
|
|
388
388
|
};
|
|
389
|
-
let
|
|
389
|
+
let k = null;
|
|
390
390
|
try {
|
|
391
|
-
|
|
391
|
+
k = c.document, c.location.href;
|
|
392
392
|
} catch {
|
|
393
393
|
return () => {
|
|
394
394
|
};
|
|
@@ -402,8 +402,8 @@ const V = (S) => {
|
|
|
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, n = (g, u) => g.forEach((e) => u.forEach(([d, y]) => e.style[d] = y));
|
|
406
|
+
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), n(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,10 +414,10 @@ const V = (S) => {
|
|
|
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, n = (g, u) => g.forEach((e) => u.forEach(([d, y]) => e.style[d] = y));
|
|
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"), n(t.querySelectorAll(".column"), [["position", "relative"]]), n(t.querySelectorAll(".advert"), [["position", "relative"]]), n(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",
|
|
422
422
|
logoTop: "44px",
|
|
423
423
|
logoLeft: "50%",
|
|
@@ -426,10 +426,10 @@ const V = (S) => {
|
|
|
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, n = (g, u) => g.forEach((e) => u.forEach(([d, y]) => e.style[d] = y));
|
|
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"), n(t.querySelectorAll(".column"), [["position", "relative"]]), n(t.querySelectorAll(".advert"), [["position", "relative"]]), n(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
|
+
}, b = {
|
|
433
433
|
siteBackgroundColor: "#ffffff",
|
|
434
434
|
logoTop: "44px",
|
|
435
435
|
logoLeft: "50%",
|
|
@@ -438,10 +438,10 @@ const V = (S) => {
|
|
|
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, n = (g, u) => g.forEach((e) => u.forEach(([d, y]) => e.style[d] = y));
|
|
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"), n(t.querySelectorAll(".advert"), [["position", "relative"]]), n(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"), n(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",
|
|
446
446
|
logoTop: "-148px",
|
|
447
447
|
logoLeft: "50%",
|
|
@@ -450,10 +450,10 @@ const V = (S) => {
|
|
|
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, n = (g, u) => g.forEach((e) => u.forEach(([d, y]) => e.style[d] = y));
|
|
454
|
+
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), n(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",
|
|
458
458
|
logoTop: "44px",
|
|
459
459
|
logoLeft: "50%",
|
|
@@ -465,20 +465,20 @@ const V = (S) => {
|
|
|
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
|
+
}, x = [
|
|
469
469
|
{ site: "https://www.nine.com.au/sport", config: r },
|
|
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: q },
|
|
471
|
+
{ site: "https://www.nine.com.au/property", config: q },
|
|
472
|
+
{ site: "https://www.nine.com.au/entertainment", config: q },
|
|
473
473
|
{ site: "https://staging.nine.com.au/sport", config: r },
|
|
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:
|
|
474
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: q },
|
|
475
|
+
{ site: "https://staging.nine.com.au/property", config: q },
|
|
476
|
+
{ site: "https://staging.nine.com.au/entertainment", config: q },
|
|
477
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: b },
|
|
478
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: b },
|
|
479
|
+
{ site: "https://preview.nine.com.au/", config: b },
|
|
480
|
+
{ site: "https://www.nine", config: b },
|
|
481
|
+
{ site: "https://staging.nine", config: b },
|
|
482
482
|
{ site: "https://entertainment", config: f },
|
|
483
483
|
{ site: "https://celebrity", config: f },
|
|
484
484
|
{ site: "https://homes", config: f },
|
|
@@ -488,55 +488,55 @@ const V = (S) => {
|
|
|
488
488
|
{ site: "https://coach", config: f },
|
|
489
489
|
{ site: "https://kitchen", config: f },
|
|
490
490
|
{ site: "https://finance", config: f },
|
|
491
|
-
{ site: "https://wwos", config:
|
|
492
|
-
{ site: "https://staging.wwos", config:
|
|
493
|
-
{ site: "https://www.9news", config:
|
|
494
|
-
{ site: "https://staging.9news", config:
|
|
491
|
+
{ site: "https://wwos", config: N },
|
|
492
|
+
{ site: "https://staging.wwos", config: N },
|
|
493
|
+
{ site: "https://www.9news", config: I },
|
|
494
|
+
{ site: "https://staging.9news", config: I },
|
|
495
495
|
{ site: "https://www.yourtv", config: f },
|
|
496
496
|
{ site: "https://staging.yourtv", config: f },
|
|
497
|
-
{ site: "https://9now", config:
|
|
497
|
+
{ site: "https://9now", config: q },
|
|
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 = C.logoSmallLeft, t.style.transform = C.logoSmallTransform, t.style.filter = C.logoSmallFilter), E(), P(), c.addEventListener("scroll", v), o = setTimeout(v, 50);
|
|
502
|
+
}, h = () => {
|
|
503
503
|
let t = null;
|
|
504
|
-
return t =
|
|
504
|
+
return t = k.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
|
|
505
|
+
}, w = () => {
|
|
506
|
+
const t = c.location.href;
|
|
507
|
+
for (let n = 0; n < x.length; n += 1)
|
|
508
|
+
if (t.indexOf(x[n].site) >= 0)
|
|
509
|
+
return x[n].config;
|
|
505
510
|
}, P = () => {
|
|
506
|
-
const t = l.location.href;
|
|
507
|
-
for (let i = 0; i < b.length; i += 1)
|
|
508
|
-
if (t.indexOf(b[i].site) >= 0)
|
|
509
|
-
return b[i].config;
|
|
510
|
-
}, N = () => {
|
|
511
511
|
if (!a) return;
|
|
512
512
|
const t = a.style;
|
|
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
|
-
a.style, t >= 0 && t <=
|
|
525
|
-
},
|
|
526
|
-
if (!
|
|
513
|
+
t.width = "100%", t.height = `${i}px`, t.position = "relative";
|
|
514
|
+
}, E = () => {
|
|
515
|
+
if (!S) return;
|
|
516
|
+
const t = S.style;
|
|
517
|
+
t.maxHeight = `${i}px`, t.minHeight = `${i}px`, t.marginTop = "0px", t.marginBottom = "0px", t.position = "absolute", t.width = "1900px", t.top = C.logoTop, t.left = C.logoLeft, t.transform = C.logoTransform, t.zIndex = "10000", t.pointerEvents = "none", C.zIndex && C.zIndex();
|
|
518
|
+
}, m = (t) => {
|
|
519
|
+
if (!S) return;
|
|
520
|
+
const n = S.style;
|
|
521
|
+
t === "big" && !window.bigActive ? (n.maxHeight = `${i}px`, n.minHeight = `${i}px`, n.position = "absolute", n.top = C.logoTop, n.zIndex = "10000", window.loadBig()) : t === "small" && !window.smallActive && (n.maxHeight = `${p}px`, n.minHeight = `${p}px`, n.position = "fixed", n.top = "0px", n.zIndex = "100000", window.loadSmall());
|
|
522
|
+
}, v = () => {
|
|
523
|
+
const t = c.scrollY;
|
|
524
|
+
a.style, t >= 0 && t <= s ? m("big") : t > s && (t > l ? m("small") : m("big"), l = t <= 0 ? 0 : t);
|
|
525
|
+
}, S = h(), C = w();
|
|
526
|
+
if (!C) return () => {
|
|
527
527
|
};
|
|
528
528
|
let o = null;
|
|
529
|
-
const
|
|
530
|
-
let
|
|
531
|
-
return
|
|
532
|
-
|
|
529
|
+
const s = A;
|
|
530
|
+
let l = 0;
|
|
531
|
+
return M(), () => {
|
|
532
|
+
c.removeEventListener("scroll", v), o && (clearTimeout(o), o = null);
|
|
533
533
|
};
|
|
534
|
-
}, U = (
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
return Math.pow(2, -10 *
|
|
538
|
-
}, j = (
|
|
539
|
-
const
|
|
534
|
+
}, U = (A) => {
|
|
535
|
+
if (A === 0 || A === 1) return A;
|
|
536
|
+
const i = 2 * Math.PI / 3;
|
|
537
|
+
return Math.pow(2, -10 * A) * Math.sin((A * 10 - 0.75) * i) + 1;
|
|
538
|
+
}, j = (A, i = 50) => `linear(${Array.from({ length: i + 1 }, (a, c) => A(c / i)).map((a) => +a.toFixed(4)).join(", ")})`, G = j(U), K = (A = {}) => {
|
|
539
|
+
const i = {
|
|
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 = (S) => {
|
|
|
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
|
+
...A
|
|
609
|
+
}, p = window.frameElement ? window.frameElement : null;
|
|
610
|
+
if (!p) return () => {
|
|
611
611
|
};
|
|
612
612
|
const a = window.parent;
|
|
613
613
|
if (!a || a === window) return () => {
|
|
614
614
|
};
|
|
615
|
-
let
|
|
615
|
+
let c = null;
|
|
616
616
|
try {
|
|
617
|
-
|
|
617
|
+
c = a.document, a.location.href;
|
|
618
618
|
} catch {
|
|
619
619
|
return () => {
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
622
|
const r = (() => {
|
|
623
|
-
const t =
|
|
623
|
+
const t = c.querySelector("#adspot-mobile-mobile-3-above");
|
|
624
624
|
if (t) return t;
|
|
625
|
-
let
|
|
626
|
-
for (;
|
|
627
|
-
if (
|
|
628
|
-
|
|
625
|
+
let n = p.parentElement;
|
|
626
|
+
for (; n && n !== c.body; ) {
|
|
627
|
+
if (n.id && n.id.includes("adspot")) return n;
|
|
628
|
+
n = n.parentElement;
|
|
629
629
|
}
|
|
630
|
-
return
|
|
630
|
+
return p.parentElement;
|
|
631
631
|
})();
|
|
632
632
|
if (!r) return () => {
|
|
633
633
|
};
|
|
634
|
-
const f = r.getAttribute("style"),
|
|
634
|
+
const f = r.getAttribute("style"), q = p.getAttribute("style"), b = [], N = {
|
|
635
635
|
width: "100vw",
|
|
636
636
|
marginLeft: "calc(50% - 50vw)",
|
|
637
|
-
height:
|
|
638
|
-
backgroundColor:
|
|
639
|
-
color:
|
|
640
|
-
fontSize:
|
|
641
|
-
fontFamily:
|
|
637
|
+
height: i.bandHeight + "px",
|
|
638
|
+
backgroundColor: i.bandBg,
|
|
639
|
+
color: i.bandColor,
|
|
640
|
+
fontSize: i.bandFontSize,
|
|
641
|
+
fontFamily: i.bandFontFamily,
|
|
642
642
|
textTransform: "uppercase",
|
|
643
|
-
letterSpacing:
|
|
643
|
+
letterSpacing: i.bandLetterSpacing,
|
|
644
644
|
display: "flex",
|
|
645
645
|
alignItems: "center",
|
|
646
646
|
justifyContent: "center",
|
|
@@ -648,45 +648,45 @@ const V = (S) => {
|
|
|
648
648
|
};
|
|
649
649
|
(() => {
|
|
650
650
|
const t = r.style;
|
|
651
|
-
t.height =
|
|
652
|
-
let
|
|
653
|
-
for (let
|
|
654
|
-
const
|
|
655
|
-
let
|
|
656
|
-
(
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
const
|
|
660
|
-
if (
|
|
661
|
-
|
|
651
|
+
t.height = i.adScrollHeight, t.maxHeight = i.adScrollHeight, t.position = "relative", r.setAttribute("poweredAC", "0.1.2"), t.clipPath = `inset(-${i.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 n = r.parentElement;
|
|
653
|
+
for (let B = 0; B < 6 && n && n !== c.body; B++) {
|
|
654
|
+
const T = a.getComputedStyle(n);
|
|
655
|
+
let H = !1;
|
|
656
|
+
(T.overflow === "hidden" || T.overflowY === "hidden") && (b.push({ el: n, prop: "overflow", val: n.style.overflow }), b.push({ el: n, prop: "overflowY", val: n.style.overflowY }), n.style.overflow = "visible", n.style.overflowY = "visible", H = !0);
|
|
657
|
+
const L = parseFloat(T.height);
|
|
658
|
+
T.height !== "auto" && !isNaN(L) && L < 600 && (b.push({ el: n, prop: "height", val: n.style.height }), n.style.height = "auto", H = !0);
|
|
659
|
+
const D = T.maxHeight;
|
|
660
|
+
if (D && D !== "none" && (b.push({ el: n, prop: "maxHeight", val: n.style.maxHeight }), n.style.maxHeight = "none", H = !0), !H && B > 1) break;
|
|
661
|
+
n = n.parentElement;
|
|
662
662
|
}
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
|
|
663
|
+
const g = p.style;
|
|
664
|
+
g.position = "fixed", g.top = "0", g.left = "0", g.width = "100vw", g.height = "100vh", g.maxWidth = "100vw", g.margin = "0", g.padding = "0", g.border = "none", g.zIndex = "1";
|
|
665
|
+
const u = c.createElement("div");
|
|
666
|
+
u.id = "interscroller-top-band-wrapper", Object.assign(u.style, {
|
|
667
667
|
position: "sticky",
|
|
668
668
|
bottom: "0",
|
|
669
669
|
width: "100vw",
|
|
670
670
|
marginLeft: "calc(50% - 50vw)",
|
|
671
|
-
zIndex:
|
|
671
|
+
zIndex: i.zIndexTop,
|
|
672
672
|
pointerEvents: "none"
|
|
673
673
|
});
|
|
674
|
-
const e =
|
|
675
|
-
e.id = "interscroller-top-band", e.textContent =
|
|
674
|
+
const e = c.createElement("div");
|
|
675
|
+
e.id = "interscroller-top-band", e.textContent = i.labelTop, Object.assign(e.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
|
+
}), u.appendChild(e), r.insertAdjacentElement("beforebegin", u);
|
|
683
|
+
const d = c.createElement("div");
|
|
684
|
+
d.id = "interscroller-bottom-band", Object.assign(d.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: i.zIndexBottom,
|
|
690
690
|
display: "flex",
|
|
691
691
|
// always rendered — no display toggling
|
|
692
692
|
overflow: "hidden",
|
|
@@ -696,48 +696,48 @@ const V = (S) => {
|
|
|
696
696
|
transition: "none"
|
|
697
697
|
// no animation on first paint
|
|
698
698
|
});
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
const
|
|
702
|
-
|
|
699
|
+
const y = c.createElement("span");
|
|
700
|
+
if (y.id = "interscroller-bottom-label", y.textContent = i.labelBottomResume, y.style.cssText = "position:relative;z-index:1;pointer-events:none;", d.appendChild(y), i.progressBarColor) {
|
|
701
|
+
const B = c.createElement("span");
|
|
702
|
+
B.id = "interscroller-bottom-progress", B.style.cssText = [
|
|
703
703
|
"position:absolute",
|
|
704
704
|
"inset:0",
|
|
705
705
|
"width:0%",
|
|
706
|
-
`background:${
|
|
706
|
+
`background:${i.progressBarColor}`,
|
|
707
707
|
"transition:none",
|
|
708
708
|
"z-index:0",
|
|
709
709
|
"pointer-events:none"
|
|
710
|
-
].join(";"),
|
|
710
|
+
].join(";"), d.appendChild(B);
|
|
711
711
|
}
|
|
712
|
-
r.after(
|
|
712
|
+
r.after(d);
|
|
713
713
|
})();
|
|
714
|
-
const
|
|
715
|
-
let
|
|
716
|
-
const
|
|
717
|
-
if (!
|
|
718
|
-
const t = r.getBoundingClientRect(),
|
|
719
|
-
!
|
|
720
|
-
const
|
|
721
|
-
|
|
714
|
+
const x = c.querySelector("#interscroller-top-band"), M = c.querySelector("#interscroller-top-band-wrapper"), h = c.querySelector("#interscroller-bottom-band"), w = c.querySelector("#interscroller-bottom-label"), P = c.querySelector("#interscroller-bottom-progress"), E = i.bandHeight, m = i.snapPx;
|
|
715
|
+
let v = !1, S = !1, C = !1, o = !1;
|
|
716
|
+
const s = (i.thresholds || []).map(() => !1), l = () => {
|
|
717
|
+
if (!h) return;
|
|
718
|
+
const t = r.getBoundingClientRect(), n = a.innerHeight, g = t.top <= n, u = t.bottom <= n - E, e = o ? t.top <= n - i.bottomBandHideAt : t.top <= n - i.bottomBandShowAt, d = r.offsetHeight, y = Math.min(1, Math.max(0, (n - t.top) / (d + n))), B = Math.min(1, Math.max(0, (n - t.top) / (d + E))), T = Math.min(1, Math.max(0, (n - t.top) / d)), H = Math.min(t.bottom, n) - Math.max(t.top - E, 0), L = Math.min(1, Math.max(0, H / n)), D = Math.max(0, Math.round(t.bottom - n));
|
|
719
|
+
!S && g && i.onEnter && i.onEnter(), !C && u && i.onExit && i.onExit(), S = g, C = u, o = e, i.onProgress && i.onProgress({ scrollProgress: y, adExposure: T, viewportCoverage: L, pxRemaining: D }), (i.thresholds || []).forEach((z, W) => {
|
|
720
|
+
const O = s[W], F = y >= z.at;
|
|
721
|
+
!O && F ? (s[W] = !0, z.onEnter && z.onEnter(y)) : O && !F && (s[W] = !1, z.onLeave && z.onLeave(y));
|
|
722
722
|
});
|
|
723
|
-
const
|
|
724
|
-
if (
|
|
725
|
-
const
|
|
726
|
-
if (!
|
|
727
|
-
const
|
|
728
|
-
|
|
729
|
-
} else !
|
|
730
|
-
} else
|
|
731
|
-
const
|
|
732
|
-
|
|
723
|
+
const _ = n;
|
|
724
|
+
if (x && t.top <= _ + i.stretchOverlap && !u) {
|
|
725
|
+
const z = _ - t.top;
|
|
726
|
+
if (!v && z <= m - i.snapOverlap) {
|
|
727
|
+
const W = 1 + Math.max(0, z + i.stretchOverlap) / E;
|
|
728
|
+
x.style.transition = "none", x.style.transform = `scaleY(${W})`;
|
|
729
|
+
} else !v && z > m - i.snapOverlap && (v = !0, x.style.transition = `transform ${i.snapDuration}s ${i.snapEase}`, x.style.transform = "scaleY(1)");
|
|
730
|
+
} else x && t.top > _ + i.stretchOverlap && (v = !1, x.style.transition = "none", x.style.transform = "scaleY(1)");
|
|
731
|
+
const $ = a.visualViewport ? Math.round(a.innerHeight - (a.visualViewport.offsetTop + a.visualViewport.height)) : 0;
|
|
732
|
+
u ? (h.style.transition = "none", h.style.transform = "none", h.style.position = "sticky", h.style.top = "0", h.style.bottom = "", h.style.left = "", h.style.marginLeft = "calc(50% - 50vw)", h.style.width = "100vw", w && (w.textContent = i.labelBottomNow), P && (P.style.width = "100%")) : e ? (w && (w.textContent = D > 0 ? B < 0.2 ? i.labelBottomResume : B < 0.75 ? i.labelBottomMid : i.labelBottomLate : i.labelBottomNow), P && (P.style.width = `${Math.round(B * 100)}%`), h.style.transition = "transform 0.3s ease", h.style.transform = "translateY(0)", h.style.position = "fixed", h.style.bottom = `${$}px`, h.style.top = "", h.style.left = "0", h.style.marginLeft = "0", h.style.width = "100vw") : (h.style.transition = "transform 0.3s ease", h.style.transform = "translateY(100%)", h.style.position = "fixed", h.style.bottom = `${$}px`, h.style.left = "0", h.style.marginLeft = "0", h.style.width = "100vw");
|
|
733
733
|
};
|
|
734
|
-
return
|
|
735
|
-
a.removeEventListener("scroll",
|
|
736
|
-
t.style[
|
|
734
|
+
return l(), a.addEventListener("scroll", l, { passive: !0 }), a.visualViewport?.addEventListener("resize", l, { passive: !0 }), () => {
|
|
735
|
+
a.removeEventListener("scroll", l), a.visualViewport?.removeEventListener("resize", l), M ? M.remove() : x && x.remove(), h && h.remove(), f ? r.setAttribute("style", f) : r.removeAttribute("style"), q ? p.setAttribute("style", q) : p.removeAttribute("style"), b.forEach(({ el: t, prop: n, val: g }) => {
|
|
736
|
+
t.style[n] = g || "";
|
|
737
737
|
});
|
|
738
738
|
};
|
|
739
|
-
}, J = (
|
|
740
|
-
const
|
|
739
|
+
}, J = (A = {}) => {
|
|
740
|
+
const i = {
|
|
741
741
|
// Adaptation dimensions
|
|
742
742
|
adaptToWidth: "100%",
|
|
743
743
|
// target width — '100%' | '100vw' | px string | false
|
|
@@ -752,61 +752,233 @@ const V = (S) => {
|
|
|
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
|
+
...A
|
|
756
|
+
}, p = window.frameElement ?? null;
|
|
757
|
+
if (!p) return () => {
|
|
758
|
+
};
|
|
759
|
+
const a = window.parent;
|
|
760
|
+
if (!a || a === window) return () => {
|
|
761
|
+
};
|
|
762
|
+
let c = null;
|
|
763
|
+
try {
|
|
764
|
+
c = a.document, a.location.href;
|
|
765
|
+
} catch {
|
|
766
|
+
return () => {
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
const r = (() => {
|
|
770
|
+
const m = c.querySelector("#adspot-mobile-mbanner-2-above");
|
|
771
|
+
if (m) return m;
|
|
772
|
+
let v = p.parentElement;
|
|
773
|
+
for (; v && v !== c.body; ) {
|
|
774
|
+
if (v.id && v.id.includes("adspot")) return v;
|
|
775
|
+
v = v.parentElement;
|
|
776
|
+
}
|
|
777
|
+
return p.parentElement;
|
|
778
|
+
})();
|
|
779
|
+
if (!r) return () => {
|
|
780
|
+
};
|
|
781
|
+
const f = r.getAttribute("style"), q = p.getAttribute("style"), b = p.parentElement !== r ? p.parentElement : null, N = b ? b.getAttribute("style") : null, I = r.parentElement, x = I ? a.getComputedStyle(I).paddingTop : null, M = parseInt(p.getAttribute("width"), 10) || 320, h = parseInt(p.getAttribute("height"), 10) || 50, w = () => {
|
|
782
|
+
const m = r.style;
|
|
783
|
+
if (m.position = "relative", m.overflow = "visible", m.boxSizing = "border-box", r.setAttribute("poweredAC", "0.1.2"), b) {
|
|
784
|
+
const S = b.style;
|
|
785
|
+
S.width = "100%", S.height = "100%", S.margin = "0", S.textAlign = "left";
|
|
786
|
+
}
|
|
787
|
+
const v = p.style;
|
|
788
|
+
v.display = "block", v.width = "100%", v.height = "100%", v.border = "none", v.margin = "0", v.padding = "0";
|
|
789
|
+
}, P = () => {
|
|
790
|
+
const m = r.style;
|
|
791
|
+
m.zIndex = String(i.zIndex), i.adaptToWidth && (m.width = i.adaptToWidth, m.maxWidth = i.maxWidth || i.adaptToWidth, i.maxWidth && i.adaptToWidth !== "100vw" && !i.adaptToWidth.endsWith("vw") ? (m.marginLeft = "auto", m.marginRight = "auto") : (i.adaptToWidth === "100vw" || i.adaptToWidth.endsWith("vw")) && (m.marginLeft = "calc(50% - 50vw)", m.marginRight = "0")), I && x && x !== "0px" && (I.style.paddingTop = "0"), i.maintainAspectRatio ? a.requestAnimationFrame(() => {
|
|
792
|
+
const S = r.offsetWidth || M, o = Math.round(S * (h / M));
|
|
793
|
+
r.style.height = o + "px", b && (b.style.height = o + "px"), p.style.height = o + "px", i.onAdapt && i.onAdapt();
|
|
794
|
+
}) : (i.adaptToHeight && (m.height = i.adaptToHeight), i.onAdapt && i.onAdapt());
|
|
795
|
+
};
|
|
796
|
+
return w(), P(), () => {
|
|
797
|
+
f ? r.setAttribute("style", f) : r.removeAttribute("style"), q ? p.setAttribute("style", q) : p.removeAttribute("style"), b && (N ? b.setAttribute("style", N) : b.removeAttribute("style")), I && x && x !== "0px" && (I.style.paddingTop = x);
|
|
798
|
+
};
|
|
799
|
+
}, Q = (A = {}) => {
|
|
800
|
+
const i = {
|
|
801
|
+
billboardHeight: 150,
|
|
802
|
+
sideStripWidth: 10,
|
|
803
|
+
zIndex: 0,
|
|
804
|
+
onAdapt: null,
|
|
805
|
+
...A
|
|
806
|
+
}, p = window.frameElement ?? null;
|
|
807
|
+
if (!p) return () => {
|
|
758
808
|
};
|
|
759
809
|
const a = window.parent;
|
|
760
810
|
if (!a || a === window) return () => {
|
|
761
811
|
};
|
|
762
|
-
let
|
|
812
|
+
let c = null;
|
|
763
813
|
try {
|
|
764
|
-
|
|
814
|
+
c = a.document, a.location.href;
|
|
765
815
|
} catch {
|
|
766
816
|
return () => {
|
|
767
817
|
};
|
|
768
818
|
}
|
|
769
819
|
const r = (() => {
|
|
770
|
-
const
|
|
771
|
-
if (
|
|
772
|
-
let
|
|
773
|
-
for (;
|
|
774
|
-
if (
|
|
775
|
-
|
|
820
|
+
const s = c.querySelector("#adspot-mobile-mbanner-2-above");
|
|
821
|
+
if (s) return s;
|
|
822
|
+
let l = p.parentElement;
|
|
823
|
+
for (; l && l !== c.body; ) {
|
|
824
|
+
if (l.id && l.id.includes("adspot")) return l;
|
|
825
|
+
l = l.parentElement;
|
|
776
826
|
}
|
|
777
|
-
return
|
|
827
|
+
return p.parentElement;
|
|
778
828
|
})();
|
|
779
829
|
if (!r) return () => {
|
|
780
830
|
};
|
|
781
|
-
const f =
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
831
|
+
const f = {
|
|
832
|
+
nine: {
|
|
833
|
+
siteBackgroundColor: "#ffffff",
|
|
834
|
+
setup(s, l) {
|
|
835
|
+
s.querySelector("main")?.style.setProperty("position", "relative");
|
|
836
|
+
const t = l?.parentElement?.nextElementSibling;
|
|
837
|
+
t && t.tagName !== "HEADER" && (t.style.paddingTop = "0px");
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
wwos: {
|
|
841
|
+
siteBackgroundColor: "#ffffff",
|
|
842
|
+
setup(s, l) {
|
|
843
|
+
s.querySelector("main")?.style.setProperty("position", "relative");
|
|
844
|
+
const t = l?.parentElement?.nextElementSibling;
|
|
845
|
+
t && t.tagName !== "HEADER" && (t.style.paddingTop = "0px");
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
nineNews: {
|
|
849
|
+
siteBackgroundColor: "#ffffff",
|
|
850
|
+
setup(s) {
|
|
851
|
+
const l = s.querySelector(".layout");
|
|
852
|
+
l && (l.style.backgroundColor = "transparent"), s.querySelector(".content")?.style.setProperty("position", "relative");
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
lifestyle: {
|
|
856
|
+
siteBackgroundColor: "#ffffff",
|
|
857
|
+
setup(s) {
|
|
858
|
+
s.querySelector("main")?.style.setProperty("position", "relative");
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
smh: {
|
|
862
|
+
siteBackgroundColor: "#ffffff",
|
|
863
|
+
setup(s) {
|
|
864
|
+
s.querySelector("main")?.style.setProperty("position", "relative");
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
theage: {
|
|
868
|
+
siteBackgroundColor: "#ffffff",
|
|
869
|
+
setup(s) {
|
|
870
|
+
s.querySelector("main")?.style.setProperty("position", "relative");
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}, q = [
|
|
874
|
+
{ site: "https://www.nine.com.au/sport", config: f.wwos },
|
|
875
|
+
{ site: "https://staging.nine.com.au/sport", config: f.wwos },
|
|
876
|
+
{ site: "https://www.nine.com.au", config: f.nine },
|
|
877
|
+
{ site: "https://staging.nine.com.au", config: f.nine },
|
|
878
|
+
{ site: "https://preview.nine.com.au", config: f.nine },
|
|
879
|
+
{ site: "https://www.9news", config: f.nineNews },
|
|
880
|
+
{ site: "https://staging.9news", config: f.nineNews },
|
|
881
|
+
{ site: "https://honey", config: f.lifestyle },
|
|
882
|
+
{ site: "https://www.smh", config: f.smh },
|
|
883
|
+
{ site: "https://www.theage", config: f.theage },
|
|
884
|
+
{ site: "https://creative-preview-an.com", config: f.nine }
|
|
885
|
+
], N = (() => {
|
|
886
|
+
const s = a.location.href;
|
|
887
|
+
for (const l of q)
|
|
888
|
+
if (s.indexOf(l.site) >= 0) return l.config;
|
|
889
|
+
return f.nine;
|
|
890
|
+
})(), I = p.getAttribute("style"), x = r.getAttribute("style"), M = p.parentElement !== r ? p.parentElement : null, h = M ? M.getAttribute("style") : null, w = r.parentElement, P = w ? w.getAttribute("style") : null;
|
|
891
|
+
let E = null;
|
|
892
|
+
const m = [], v = () => {
|
|
893
|
+
let s = p.parentElement;
|
|
894
|
+
for (; s && s !== c.body && s !== c.documentElement; ) {
|
|
895
|
+
const u = a.getComputedStyle(s);
|
|
896
|
+
(u.transform && u.transform !== "none" || u.willChange && u.willChange !== "auto" || u.contain && u.contain !== "none" || u.filter && u.filter !== "none" || u.perspective && u.perspective !== "none") && (m.push({ el: s, orig: s.getAttribute("style") }), s.style.transform = "none", s.style.willChange = "auto", s.style.contain = "none", s.style.filter = "none", s.style.perspective = "none"), u.overflow !== "visible" && (m.find((d) => d.el === s) || m.push({ el: s, orig: s.getAttribute("style") }), s.style.overflow = "visible"), s = s.parentElement;
|
|
897
|
+
}
|
|
898
|
+
const l = p.style;
|
|
899
|
+
if (l.position = "fixed", l.top = "0", l.left = "0", l.width = "100vw", l.height = "100vh", l.zIndex = String(i.zIndex), l.border = "none", l.margin = "0", l.padding = "0", l.display = "block", r.setAttribute("poweredAC", "0.1.2"), M) {
|
|
900
|
+
const u = M.style;
|
|
901
|
+
u.width = "100%", u.height = "100%", u.overflow = "visible", u.position = "static", u.margin = "0";
|
|
786
902
|
}
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
903
|
+
const t = r.style;
|
|
904
|
+
t.height = i.billboardHeight + "px", t.minHeight = i.billboardHeight + "px", t.background = "transparent", t.overflow = "visible", t.position = "relative", t.width = "100%", t.padding = "0", t.margin = "0", w && (w.style.overflow = "visible", w.style.position = "relative", w.style.backgroundColor = "transparent", w.style.height = i.billboardHeight + "px", w.style.minHeight = i.billboardHeight + "px", w.style.maxHeight = i.billboardHeight + "px", w.style.padding = "0", w.style.margin = "0", w.setAttribute("data-mf-slot", ""));
|
|
905
|
+
const n = `max(${i.sideStripWidth}px, env(safe-area-inset-left))`, g = `max(${i.sideStripWidth}px, env(safe-area-inset-right))`;
|
|
906
|
+
E = c.createElement("style"), E.id = "mobilefireplace-pac", E.textContent = `
|
|
907
|
+
/* Mobile Fireplace — powered-ad-config */
|
|
908
|
+
html, body {
|
|
909
|
+
background-color: transparent !important;
|
|
910
|
+
overflow-x: hidden !important;
|
|
911
|
+
overscroll-behavior-x: none !important;
|
|
912
|
+
}
|
|
913
|
+
/* App wrapper (direct child of body) — transparent so the
|
|
914
|
+
fixed creative is visible through the side gaps. */
|
|
915
|
+
body > * {
|
|
916
|
+
position: relative;
|
|
917
|
+
background-color: transparent !important;
|
|
918
|
+
}
|
|
919
|
+
/* Content blocks (grandchildren of body) — opaque background
|
|
920
|
+
+ side margins so the creative peeks through on both sides. */
|
|
921
|
+
body > * > * {
|
|
922
|
+
position: relative;
|
|
923
|
+
z-index: 1;
|
|
924
|
+
background-color: ${N.siteBackgroundColor};
|
|
925
|
+
margin-left: ${n} !important;
|
|
926
|
+
margin-right: ${g} !important;
|
|
927
|
+
}
|
|
928
|
+
/* Header, nav and network nav stay full-width — no side margin, keep own background */
|
|
929
|
+
body > * > header,
|
|
930
|
+
body > * > nav,
|
|
931
|
+
body > * > [data-network-nav],
|
|
932
|
+
body > * > [data-header-nav] {
|
|
933
|
+
margin-left: 0 !important;
|
|
934
|
+
margin-right: 0 !important;
|
|
935
|
+
}
|
|
936
|
+
/* The mobilefireplace slot wrapper — transparent, full-width, no margins */
|
|
937
|
+
[data-mf-slot],
|
|
938
|
+
[data-mf-slot] > * {
|
|
939
|
+
background-color: transparent !important;
|
|
940
|
+
z-index: auto !important;
|
|
941
|
+
margin: 0 !important;
|
|
942
|
+
padding: 0 !important;
|
|
943
|
+
}
|
|
944
|
+
/* The ad slot itself stays transparent */
|
|
945
|
+
#adspot-mobile-mbanner-2-above,
|
|
946
|
+
#adspot-mobile-mbanner-2-above > * {
|
|
947
|
+
background-color: transparent !important;
|
|
948
|
+
z-index: auto !important;
|
|
949
|
+
margin: 0 !important;
|
|
950
|
+
padding: 0 !important;
|
|
951
|
+
}
|
|
952
|
+
`, c.head.appendChild(E), N.setup && N.setup(c, r);
|
|
953
|
+
};
|
|
954
|
+
let S = null;
|
|
955
|
+
const C = () => {
|
|
956
|
+
const s = a.innerWidth, l = a.innerHeight;
|
|
957
|
+
if (s > l) {
|
|
958
|
+
const t = l / s, n = Math.round(i.billboardHeight * t);
|
|
959
|
+
r.style.height = n + "px", r.style.minHeight = n + "px";
|
|
960
|
+
} else
|
|
961
|
+
r.style.height = i.billboardHeight + "px", r.style.minHeight = i.billboardHeight + "px";
|
|
795
962
|
};
|
|
796
|
-
return
|
|
797
|
-
|
|
963
|
+
return v(), S = C, a.addEventListener("resize", S), C(), i.onAdapt && a.requestAnimationFrame(() => {
|
|
964
|
+
i.onAdapt();
|
|
965
|
+
}), () => {
|
|
966
|
+
S && (a.removeEventListener("resize", S), S = null), E && E.parentNode && (E.parentNode.removeChild(E), E = null), I ? p.setAttribute("style", I) : p.removeAttribute("style");
|
|
967
|
+
for (const { el: s, orig: l } of m)
|
|
968
|
+
l ? s.setAttribute("style", l) : s.removeAttribute("style");
|
|
969
|
+
m.length = 0, x ? r.setAttribute("style", x) : r.removeAttribute("style"), M && (h ? M.setAttribute("style", h) : M.removeAttribute("style")), w && (w.removeAttribute("data-mf-slot"), P ? w.setAttribute("style", P) : w.removeAttribute("style"));
|
|
798
970
|
};
|
|
799
971
|
};
|
|
800
972
|
let R = () => {
|
|
801
973
|
};
|
|
802
|
-
function
|
|
974
|
+
function Z({ adFormat: A = "", stickyOffset: i = 0, logoPosX: p = 0, logoHeight: a = 0, logoSmallHeight: c = 0, ...k } = {}) {
|
|
803
975
|
typeof R == "function" && R();
|
|
804
976
|
let r = () => {
|
|
805
977
|
};
|
|
806
|
-
return
|
|
978
|
+
return A === "fireplace" ? r = V(i) : A === "fireplace-collant" ? r = Y(i) : A === "logomorph" ? r = X(p, a, c) : A === "interscroller" ? r = K(k) : A === "liquidframe" ? r = J(k) : A === "mobilefireplace" ? r = Q(k) : console.warn("[powered-ad-config] Unknown ad format:", A), R = typeof r == "function" ? r : () => {
|
|
807
979
|
}, R;
|
|
808
980
|
}
|
|
809
|
-
|
|
981
|
+
Z.version = "0.1.2";
|
|
810
982
|
export {
|
|
811
|
-
|
|
983
|
+
Z as default
|
|
812
984
|
};
|