powered-ad-config 0.0.93 → 0.0.94
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 +418 -302
- package/dist/powered-ad-config.umd.js +7 -7
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
1
|
+
const W = (w) => {
|
|
2
|
+
const n = window.frameElement ? window.frameElement : null;
|
|
3
|
+
if (!n) return () => {
|
|
4
4
|
};
|
|
5
|
-
const
|
|
6
|
-
if (!
|
|
5
|
+
const f = window.parent;
|
|
6
|
+
if (!f || f === window) return () => {
|
|
7
7
|
};
|
|
8
8
|
let p = null;
|
|
9
9
|
try {
|
|
10
|
-
p =
|
|
10
|
+
p = f.document, f.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 F = (v) => {
|
|
|
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, g = (r, t) => r.forEach((s) => t.forEach(([m, h]) => s.style[m] = h));
|
|
26
|
+
o.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector("article")?.setAttribute("style", "position:relative"), o.querySelector("#article")?.setAttribute("style", "position:relative"), o.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), o.querySelector("#Index")?.setAttribute("style", "position:relative"), o.querySelector(".show")?.setAttribute("style", "position:relative"), o.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), g(o.querySelectorAll(".column"), [["position", "relative"]]), g(o.querySelectorAll(".advert"), [["position", "relative"]]), g(o.querySelectorAll("blockquote"), [["zIndex", "1"]]), o.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:-24px"), o.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
|
|
27
27
|
}
|
|
28
|
-
},
|
|
28
|
+
}, S = {
|
|
29
29
|
siteBackgroundColor: "#ffffff",
|
|
30
30
|
fireplaceLeftMargin: 0,
|
|
31
31
|
adNodeMarginTop: -24,
|
|
@@ -35,10 +35,10 @@ const F = (v) => {
|
|
|
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, g = (r, t) => r.forEach((s) => t.forEach(([m, h]) => s.style[m] = h));
|
|
39
|
+
o.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector("article")?.setAttribute("style", "position:relative"), o.querySelector("#article")?.setAttribute("style", "position:relative"), o.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), o.querySelector("#Index")?.setAttribute("style", "position:relative"), o.querySelector(".show")?.setAttribute("style", "position:relative"), g(o.querySelectorAll(".column"), [["position", "relative"]]), g(o.querySelectorAll(".advert"), [["position", "relative"]]), g(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
|
+
}, i = {
|
|
42
42
|
siteBackgroundColor: "#ffffff",
|
|
43
43
|
fireplaceLeftMargin: 0,
|
|
44
44
|
adNodeMarginTop: -25,
|
|
@@ -50,12 +50,12 @@ const F = (v) => {
|
|
|
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 r = o.createElement("style");
|
|
54
|
+
r.innerHTML = `
|
|
55
55
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
56
56
|
position: static;
|
|
57
57
|
}
|
|
58
|
-
`, o.head.appendChild(
|
|
58
|
+
`, o.head.appendChild(r);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}, y = {
|
|
@@ -68,17 +68,17 @@ const F = (v) => {
|
|
|
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, r = o.querySelector("footer").previousElementSibling;
|
|
72
|
+
if (r && r.tagName.toLowerCase() === "div" && (r.style.position = "relative"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
73
|
+
let s = o.createElement("style");
|
|
74
|
+
s.innerHTML = `
|
|
75
75
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
76
76
|
position: static;
|
|
77
77
|
}
|
|
78
|
-
`, o.head.appendChild(
|
|
78
|
+
`, o.head.appendChild(s);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, x = {
|
|
82
82
|
siteBackgroundColor: "#f7f7f7",
|
|
83
83
|
fireplaceLeftMargin: 0,
|
|
84
84
|
adNodeMarginTop: -25,
|
|
@@ -88,8 +88,8 @@ const F = (v) => {
|
|
|
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, g = (t, s) => t.forEach((m) => s.forEach(([h, e]) => m.style[h] = e));
|
|
92
|
+
if (o.querySelector(".container--padded")?.setAttribute("style", "position:relative"), g(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 F = (v) => {
|
|
|
98
98
|
`, o.head.appendChild(t);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, A = {
|
|
102
102
|
siteBackgroundColor: "#ffffff",
|
|
103
103
|
fireplaceLeftMargin: 0,
|
|
104
104
|
adNodeMarginTop: -32,
|
|
@@ -111,83 +111,83 @@ const F = (v) => {
|
|
|
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
|
+
}, B = [
|
|
115
115
|
{ site: "https://www.nine.com.au/sport", config: y },
|
|
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: S },
|
|
117
|
+
{ site: "https://www.nine.com.au/property", config: S },
|
|
118
|
+
{ site: "https://www.nine.com.au/entertainment", config: S },
|
|
119
119
|
{ site: "https://staging.nine.com.au/sport", config: y },
|
|
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:
|
|
123
|
-
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config:
|
|
124
|
-
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config:
|
|
125
|
-
{ site: "https://preview.nine.com.au/", config:
|
|
126
|
-
{ site: "https://www.nine", config:
|
|
127
|
-
{ site: "https://staging.nine", config:
|
|
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:
|
|
120
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: S },
|
|
121
|
+
{ site: "https://staging.nine.com.au/property", config: S },
|
|
122
|
+
{ site: "https://staging.nine.com.au/entertainment", config: S },
|
|
123
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: i },
|
|
124
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: i },
|
|
125
|
+
{ site: "https://preview.nine.com.au/", config: i },
|
|
126
|
+
{ site: "https://www.nine", config: i },
|
|
127
|
+
{ site: "https://staging.nine", config: i },
|
|
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: x },
|
|
138
138
|
{ site: "https://staging.wwos", config: y },
|
|
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: A },
|
|
140
|
+
{ site: "https://staging.9news", config: A },
|
|
141
|
+
{ site: "https://www.yourtv", config: c },
|
|
142
|
+
{ site: "https://staging.yourtv", config: c },
|
|
143
|
+
{ site: "https://9now", config: S },
|
|
144
|
+
{ site: "https://creative-preview-an.com", config: c }
|
|
145
|
+
], b = () => {
|
|
146
146
|
const o = window.document.getElementById("nineContent");
|
|
147
|
-
o && (o.style.backgroundColor =
|
|
148
|
-
},
|
|
147
|
+
o && (o.style.backgroundColor = v.siteBackgroundColor), I(), T(), f.addEventListener("scroll", M), q = setTimeout(M, 50);
|
|
148
|
+
}, C = () => {
|
|
149
149
|
let o = null;
|
|
150
150
|
return o = p.querySelector('div[id*="billboard"][id*="above"]'), o;
|
|
151
|
-
},
|
|
152
|
-
const o =
|
|
153
|
-
for (let
|
|
154
|
-
if (o.indexOf(
|
|
155
|
-
return
|
|
156
|
-
}, I = () => {
|
|
157
|
-
if (!i) return;
|
|
158
|
-
const o = i.style;
|
|
159
|
-
o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.transform = "translate(-50%, 0)";
|
|
151
|
+
}, u = () => {
|
|
152
|
+
const o = f.location.href;
|
|
153
|
+
for (let g = 0; g < B.length; g += 1)
|
|
154
|
+
if (o.indexOf(B[g].site) >= 0)
|
|
155
|
+
return B[g].config;
|
|
160
156
|
}, T = () => {
|
|
161
|
-
if (!
|
|
162
|
-
const o =
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
157
|
+
if (!n) return;
|
|
158
|
+
const o = n.style;
|
|
159
|
+
o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.transform = "translate(-50%, 0)";
|
|
160
|
+
}, I = () => {
|
|
161
|
+
if (!l) return;
|
|
162
|
+
const o = l.style;
|
|
163
|
+
l.className = "", o.minHeight = "250px", o.marginTop = v.adNodeMarginTop + "px", o.marginBottom = v.adNodeMarginBottom + "px", o.position = "static", o.display = "block", v.zIndex && v.zIndex();
|
|
164
|
+
}, M = () => {
|
|
165
|
+
const o = f.scrollY, g = n.style, r = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
166
|
+
o >= 0 && o <= k ? (g.transform = `translate(-50%, ${-o}px)`, r.transform = "translateY(0)") : o > k && o <= E ? (g.transform = `translate(-50%, ${-k}px)`, r.transform = `translateY(${k - o}px)`) : o > E && (g.transform = `translate(-50%, ${-k}px)`, r.transform = "translateY(-250px)");
|
|
167
|
+
}, l = C(), v = u();
|
|
168
|
+
if (!v) return () => {
|
|
169
169
|
};
|
|
170
|
-
let
|
|
171
|
-
const
|
|
172
|
-
return
|
|
173
|
-
|
|
170
|
+
let q = null;
|
|
171
|
+
const k = -v.responsiveScroll + w, E = k + 250;
|
|
172
|
+
return b(), () => {
|
|
173
|
+
f.removeEventListener("scroll", M), q && (clearTimeout(q), q = null);
|
|
174
174
|
};
|
|
175
|
-
},
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
175
|
+
}, V = (w) => {
|
|
176
|
+
const n = window.frameElement ? window.frameElement : null;
|
|
177
|
+
if (!n) return () => {
|
|
178
178
|
};
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
179
|
+
const f = window.parent;
|
|
180
|
+
if (!f || f === window) return () => {
|
|
181
181
|
};
|
|
182
182
|
let p = null;
|
|
183
183
|
try {
|
|
184
|
-
p =
|
|
184
|
+
p = f.document, f.location.href;
|
|
185
185
|
} catch {
|
|
186
186
|
return () => {
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
const
|
|
190
|
-
let
|
|
189
|
+
const c = document.getElementById("nineMasthead"), S = c ? c.style : {};
|
|
190
|
+
let i;
|
|
191
191
|
const y = {
|
|
192
192
|
siteBackgroundColor: "#ffffff",
|
|
193
193
|
fireplaceLeftMargin: 0,
|
|
@@ -199,10 +199,10 @@ const F = (v) => {
|
|
|
199
199
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
200
200
|
maskOffset: 298,
|
|
201
201
|
zIndex: function() {
|
|
202
|
-
const e = window.parent.document,
|
|
203
|
-
e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), e.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"),
|
|
202
|
+
const e = window.parent.document, a = (d, N) => d.forEach((L) => N.forEach(([z, D]) => L.style[z] = D));
|
|
203
|
+
e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), e.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), a(e.querySelectorAll(".column"), [["position", "relative"]]), a(e.querySelectorAll(".advert"), [["position", "relative"]]), a(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
|
|
204
204
|
}
|
|
205
|
-
},
|
|
205
|
+
}, x = {
|
|
206
206
|
siteBackgroundColor: "#ffffff",
|
|
207
207
|
fireplaceLeftMargin: 0,
|
|
208
208
|
adNodeMarginTop: -24,
|
|
@@ -213,10 +213,10 @@ const F = (v) => {
|
|
|
213
213
|
stickyMargin: { offset: 160, isSticky: !0 },
|
|
214
214
|
maskOffset: window.parent.document.querySelector('div[class*="video-index__MyContainer"]') ? 248 : 298,
|
|
215
215
|
zIndex: function() {
|
|
216
|
-
const e = window.parent.document,
|
|
217
|
-
e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"),
|
|
216
|
+
const e = window.parent.document, a = (d, N) => d.forEach((L) => N.forEach(([z, D]) => L.style[z] = D));
|
|
217
|
+
e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), a(e.querySelectorAll(".column"), [["position", "relative"]]), a(e.querySelectorAll(".advert"), [["position", "relative"]]), a(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), e.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px"), e.querySelector('div[class*="MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px");
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, A = {
|
|
220
220
|
siteBackgroundColor: "#ffffff",
|
|
221
221
|
fireplaceLeftMargin: 0,
|
|
222
222
|
adNodeMarginTop: -24,
|
|
@@ -229,15 +229,15 @@ const F = (v) => {
|
|
|
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 d = e.createElement("style");
|
|
233
|
+
d.innerHTML = `
|
|
234
234
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
235
235
|
position: static;
|
|
236
236
|
}
|
|
237
|
-
`, e.head.appendChild(
|
|
237
|
+
`, e.head.appendChild(d);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
},
|
|
240
|
+
}, B = {
|
|
241
241
|
siteBackgroundColor: "#ffffff",
|
|
242
242
|
fireplaceLeftMargin: 0,
|
|
243
243
|
adNodeMarginTop: -24,
|
|
@@ -248,17 +248,17 @@ const F = (v) => {
|
|
|
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, d = e.querySelector("footer").previousElementSibling;
|
|
252
|
+
if (d && d.tagName.toLowerCase() === "div" && (d.style.position = "relative"), e.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
253
|
+
let L = e.createElement("style");
|
|
254
|
+
L.innerHTML = `
|
|
255
255
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
256
256
|
position: static;
|
|
257
257
|
}
|
|
258
|
-
`, e.head.appendChild(
|
|
258
|
+
`, e.head.appendChild(L);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, b = {
|
|
262
262
|
siteBackgroundColor: "#ffffff",
|
|
263
263
|
fireplaceLeftMargin: 0,
|
|
264
264
|
adNodeMarginTop: -25,
|
|
@@ -269,17 +269,17 @@ const F = (v) => {
|
|
|
269
269
|
stickyMargin: { offset: 175, isSticky: !0 },
|
|
270
270
|
maskOffset: 274,
|
|
271
271
|
zIndex: function() {
|
|
272
|
-
const e = window.parent.document,
|
|
273
|
-
if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"),
|
|
274
|
-
let
|
|
275
|
-
|
|
272
|
+
const e = window.parent.document, a = (N, L) => N.forEach((z) => L.forEach(([D, H]) => z.style[D] = H));
|
|
273
|
+
if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), a(e.querySelectorAll(".advert"), [["position", "relative"]]), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none"), e.querySelector(".score-strip")?.setAttribute("style", "display:none"), e.querySelector(".feed-header__breadcrumbs")?.setAttribute("style", "display:none"), e.querySelector(".layout.container")?.setAttribute("style", "padding:0"), e.querySelector(".empty-div")?.setAttribute("style", "display:none"), e.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
274
|
+
let N = e.createElement("style");
|
|
275
|
+
N.innerHTML = `
|
|
276
276
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
277
277
|
position: static;
|
|
278
278
|
}
|
|
279
|
-
`, e.head.appendChild(
|
|
279
|
+
`, e.head.appendChild(N);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, C = {
|
|
283
283
|
siteBackgroundColor: "#ffffff",
|
|
284
284
|
fireplaceLeftMargin: 0,
|
|
285
285
|
adNodeMarginTop: -32,
|
|
@@ -292,23 +292,23 @@ const F = (v) => {
|
|
|
292
292
|
zIndex: function() {
|
|
293
293
|
const e = window.parent.document;
|
|
294
294
|
e.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), e.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), e.querySelector(".content")?.setAttribute("style", "padding-top:32px"), e.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), e.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
|
|
295
|
-
const
|
|
296
|
-
|
|
295
|
+
const a = e.querySelector('[class*="VideoIndexComponent"]');
|
|
296
|
+
a && (e.querySelector(".breadcrumbs")?.setAttribute("style", "display:none"), a.style.maxWidth = "1190px", a.style.margin = "auto", a.style.position = "relative");
|
|
297
297
|
}
|
|
298
|
-
},
|
|
299
|
-
{ site: "https://www.nine.com.au/sport", config:
|
|
300
|
-
{ site: "https://www.nine.com.au/product-reviews", config:
|
|
301
|
-
{ site: "https://www.nine.com.au/property", config:
|
|
302
|
-
{ site: "https://www.nine.com.au/entertainment", config:
|
|
303
|
-
{ site: "https://staging.nine.com.au/sport", config:
|
|
304
|
-
{ site: "https://staging.nine.com.au/product-reviews", config:
|
|
305
|
-
{ site: "https://staging.nine.com.au/property", config:
|
|
306
|
-
{ site: "https://staging.nine.com.au/entertainment", config:
|
|
307
|
-
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config:
|
|
308
|
-
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config:
|
|
309
|
-
{ site: "https://preview.nine.com.au/", config:
|
|
310
|
-
{ site: "https://www.nine", config:
|
|
311
|
-
{ site: "https://staging.nine", config:
|
|
298
|
+
}, u = [
|
|
299
|
+
{ site: "https://www.nine.com.au/sport", config: B },
|
|
300
|
+
{ site: "https://www.nine.com.au/product-reviews", config: x },
|
|
301
|
+
{ site: "https://www.nine.com.au/property", config: x },
|
|
302
|
+
{ site: "https://www.nine.com.au/entertainment", config: x },
|
|
303
|
+
{ site: "https://staging.nine.com.au/sport", config: B },
|
|
304
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: x },
|
|
305
|
+
{ site: "https://staging.nine.com.au/property", config: x },
|
|
306
|
+
{ site: "https://staging.nine.com.au/entertainment", config: x },
|
|
307
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: A },
|
|
308
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: A },
|
|
309
|
+
{ site: "https://preview.nine.com.au/", config: A },
|
|
310
|
+
{ site: "https://www.nine", config: A },
|
|
311
|
+
{ site: "https://staging.nine", config: A },
|
|
312
312
|
{ site: "https://entertainment", config: y },
|
|
313
313
|
{ site: "https://celebrity", config: y },
|
|
314
314
|
{ site: "https://homes", config: y },
|
|
@@ -318,82 +318,82 @@ const F = (v) => {
|
|
|
318
318
|
{ site: "https://coach", config: y },
|
|
319
319
|
{ site: "https://kitchen", config: y },
|
|
320
320
|
{ site: "https://finance", config: y },
|
|
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: b },
|
|
322
|
+
{ site: "https://staging.wwos", config: B },
|
|
323
|
+
{ site: "https://www.9news", config: C },
|
|
324
|
+
{ site: "https://staging.9news", config: C },
|
|
325
325
|
{ site: "https://www.yourtv", config: y },
|
|
326
326
|
{ site: "https://staging.yourtv", config: y },
|
|
327
|
-
{ site: "https://9now", config:
|
|
327
|
+
{ site: "https://9now", config: x },
|
|
328
328
|
{ site: "https://creative-preview-an.com", config: y }
|
|
329
|
-
],
|
|
329
|
+
], T = () => {
|
|
330
330
|
const e = window.document.getElementById("nineContent");
|
|
331
|
-
e && (e.style.backgroundColor = t.siteBackgroundColor),
|
|
332
|
-
},
|
|
331
|
+
e && (e.style.backgroundColor = t.siteBackgroundColor), c && (S.setProperty("--masthead-height", "250px"), S.height = "var(--masthead-height)"), q(), v(), M(), k(), f.addEventListener("scroll", g, { passive: !0 }), s = setTimeout(g, 50);
|
|
332
|
+
}, I = () => {
|
|
333
333
|
let e = null;
|
|
334
334
|
return e = p.querySelector('div[id*="billboard"][id*="above"]'), e;
|
|
335
|
-
},
|
|
335
|
+
}, M = () => {
|
|
336
336
|
let e = null;
|
|
337
337
|
if (!window.parent) return e;
|
|
338
338
|
if (e = p.querySelector('div[id*="halfpage"][id*="above"]'), !e) return;
|
|
339
|
-
let
|
|
340
|
-
for (let
|
|
341
|
-
if (
|
|
342
|
-
|
|
339
|
+
let a = e;
|
|
340
|
+
for (let d = 0; d < 3; d++)
|
|
341
|
+
if (a = a.parentNode, a && getComputedStyle(a).position === "sticky") {
|
|
342
|
+
a.setAttribute("style", `top: ${t.stickyMargin.offset}px`);
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
|
-
},
|
|
346
|
-
const e =
|
|
347
|
-
for (let
|
|
348
|
-
if (e.indexOf(
|
|
349
|
-
return
|
|
350
|
-
},
|
|
351
|
-
if (!i) return;
|
|
352
|
-
const e = i.style;
|
|
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
|
-
}, k = () => {
|
|
345
|
+
}, l = () => {
|
|
346
|
+
const e = f.location.href;
|
|
347
|
+
for (let a = 0; a < u.length; a += 1)
|
|
348
|
+
if (e.indexOf(u[a].site) >= 0)
|
|
349
|
+
return u[a].config;
|
|
350
|
+
}, v = () => {
|
|
355
351
|
if (!n) return;
|
|
356
352
|
const e = n.style;
|
|
357
|
-
|
|
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)";
|
|
358
354
|
}, q = () => {
|
|
359
|
-
|
|
355
|
+
if (!r) return;
|
|
356
|
+
const e = r.style;
|
|
357
|
+
r.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
|
+
}, k = () => {
|
|
359
|
+
i = p.querySelector('div[data-contentunit-id="stan"]')?.parentNode || p.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode || p.querySelector('div[class*="__MyContainer"]') || p.querySelector('div[class*="__ArticleContainer"]') || p.querySelector('div[class*="__VideoIndexComponent"]') || p.querySelector("div.container.layout") || p.querySelector("main.container.layout"), i && (i.style.willChange = "clip-path", i.style.transition = "none", i.style.webkitBackfaceVisibility = "hidden", i.style.backfaceVisibility = "hidden", i.style.transform = "translate3d(0,0,0)", i.style.backgroundColor = t.siteBackgroundColor, i.style.setProperty("--mask-inset", "0px"), i.style.clipPath = "inset(var(--mask-inset, 0px) 0 0 0)");
|
|
360
360
|
};
|
|
361
|
-
let
|
|
362
|
-
const
|
|
363
|
-
const e =
|
|
364
|
-
if (
|
|
365
|
-
if (
|
|
366
|
-
if (
|
|
367
|
-
const
|
|
368
|
-
|
|
361
|
+
let E = 0, o = 0;
|
|
362
|
+
const g = () => {
|
|
363
|
+
const e = f.scrollY, a = e > E, d = e > h ? e - t.maskOffset : 0, N = Math.abs(d - o);
|
|
364
|
+
if (i)
|
|
365
|
+
if (a && d > o)
|
|
366
|
+
if (N > 100) {
|
|
367
|
+
const L = Math.max(0, d - 100);
|
|
368
|
+
i.style.transition = "none", i.style.setProperty("--mask-inset", `${L}px`), i.offsetHeight, i.style.transition = "clip-path 0.3s ease-out", i.style.setProperty("--mask-inset", `${d}px`);
|
|
369
369
|
} else
|
|
370
|
-
|
|
370
|
+
i.style.transition = "clip-path 0.3s ease-out", i.style.setProperty("--mask-inset", `${d}px`);
|
|
371
371
|
else
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
},
|
|
372
|
+
i.style.transition = "none", i.style.setProperty("--mask-inset", `${d}px`);
|
|
373
|
+
E = e, o = d, e > h ? (n.style.setProperty("--transform-y", `${-m}px`), S.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : e > m && e <= h ? (n.style.setProperty("--transform-y", `${-m}px`), S.setProperty("--masthead-height", `${250 + m - e}px`), window.CollantOn && window.goBillboard()) : e >= 0 && e <= m && (n.style.setProperty("--transform-y", `${-e}px`), S.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
|
|
374
|
+
}, r = I(), t = l();
|
|
375
375
|
if (!t) return () => {
|
|
376
376
|
};
|
|
377
|
-
let
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
|
|
377
|
+
let s = null;
|
|
378
|
+
const m = -t.responsiveScroll + w, h = m + 150;
|
|
379
|
+
return T(), () => {
|
|
380
|
+
f.removeEventListener("scroll", g), s && (clearTimeout(s), s = null);
|
|
381
381
|
};
|
|
382
|
-
},
|
|
382
|
+
}, X = (w, n, f) => {
|
|
383
383
|
const p = window.frameElement ? window.frameElement : null;
|
|
384
384
|
if (!p) return () => {
|
|
385
385
|
};
|
|
386
|
-
const
|
|
387
|
-
if (!
|
|
386
|
+
const c = window.parent;
|
|
387
|
+
if (!c || c === window) return () => {
|
|
388
388
|
};
|
|
389
|
-
let
|
|
389
|
+
let S = null;
|
|
390
390
|
try {
|
|
391
|
-
|
|
391
|
+
S = c.document, c.location.href;
|
|
392
392
|
} catch {
|
|
393
393
|
return () => {
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
const
|
|
396
|
+
const i = {
|
|
397
397
|
siteBackgroundColor: "#ffffff",
|
|
398
398
|
logoTop: "44px",
|
|
399
399
|
logoLeft: "50%",
|
|
@@ -402,8 +402,8 @@ const F = (v) => {
|
|
|
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, s = (m, h) => m.forEach((e) => h.forEach(([a, d]) => e.style[a] = d));
|
|
406
|
+
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), s(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
|
}, y = {
|
|
409
409
|
siteBackgroundColor: "#ffffff",
|
|
@@ -414,10 +414,10 @@ const F = (v) => {
|
|
|
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, s = (m, h) => m.forEach((e) => h.forEach(([a, d]) => e.style[a] = d));
|
|
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"), s(t.querySelectorAll(".column"), [["position", "relative"]]), s(t.querySelectorAll(".advert"), [["position", "relative"]]), s(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
|
+
}, x = {
|
|
421
421
|
siteBackgroundColor: "#ffffff",
|
|
422
422
|
logoTop: "44px",
|
|
423
423
|
logoLeft: "50%",
|
|
@@ -426,10 +426,10 @@ const F = (v) => {
|
|
|
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, s = (m, h) => m.forEach((e) => h.forEach(([a, d]) => e.style[a] = d));
|
|
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"), s(t.querySelectorAll(".column"), [["position", "relative"]]), s(t.querySelectorAll(".advert"), [["position", "relative"]]), s(t.querySelectorAll("blockquote"), [["zIndex", "1"]]), t.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), t.querySelector('section[class^="WatchNow__Container"]')?.setAttribute("style", "margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"), t.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:0px"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
|
|
431
431
|
}
|
|
432
|
-
},
|
|
432
|
+
}, A = {
|
|
433
433
|
siteBackgroundColor: "#ffffff",
|
|
434
434
|
logoTop: "44px",
|
|
435
435
|
logoLeft: "50%",
|
|
@@ -438,10 +438,10 @@ const F = (v) => {
|
|
|
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, s = (m, h) => m.forEach((e) => h.forEach(([a, d]) => e.style[a] = d));
|
|
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"), s(t.querySelectorAll(".advert"), [["position", "relative"]]), s(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"), s(t.querySelectorAll("small"), [["position", "relative"]]), t.querySelector("small")?.setAttribute("style", "position:inherit"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
|
|
443
443
|
}
|
|
444
|
-
},
|
|
444
|
+
}, B = {
|
|
445
445
|
siteBackgroundColor: "#ffffff",
|
|
446
446
|
logoTop: "-148px",
|
|
447
447
|
logoLeft: "50%",
|
|
@@ -450,10 +450,10 @@ const F = (v) => {
|
|
|
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, s = (m, h) => m.forEach((e) => h.forEach(([a, d]) => e.style[a] = d));
|
|
454
|
+
t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), s(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
|
+
}, b = {
|
|
457
457
|
siteBackgroundColor: "#ffffff",
|
|
458
458
|
logoTop: "44px",
|
|
459
459
|
logoLeft: "50%",
|
|
@@ -465,20 +465,20 @@ const F = (v) => {
|
|
|
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
|
-
},
|
|
469
|
-
{ site: "https://www.nine.com.au/sport", config:
|
|
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:
|
|
473
|
-
{ site: "https://staging.nine.com.au/sport", config:
|
|
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:
|
|
468
|
+
}, C = [
|
|
469
|
+
{ site: "https://www.nine.com.au/sport", config: i },
|
|
470
|
+
{ site: "https://www.nine.com.au/product-reviews", config: x },
|
|
471
|
+
{ site: "https://www.nine.com.au/property", config: x },
|
|
472
|
+
{ site: "https://www.nine.com.au/entertainment", config: x },
|
|
473
|
+
{ site: "https://staging.nine.com.au/sport", config: i },
|
|
474
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: x },
|
|
475
|
+
{ site: "https://staging.nine.com.au/property", config: x },
|
|
476
|
+
{ site: "https://staging.nine.com.au/entertainment", config: x },
|
|
477
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: A },
|
|
478
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: A },
|
|
479
|
+
{ site: "https://preview.nine.com.au/", config: A },
|
|
480
|
+
{ site: "https://www.nine", config: A },
|
|
481
|
+
{ site: "https://staging.nine", config: A },
|
|
482
482
|
{ site: "https://entertainment", config: y },
|
|
483
483
|
{ site: "https://celebrity", config: y },
|
|
484
484
|
{ site: "https://homes", config: y },
|
|
@@ -488,55 +488,55 @@ const F = (v) => {
|
|
|
488
488
|
{ site: "https://coach", config: y },
|
|
489
489
|
{ site: "https://kitchen", config: y },
|
|
490
490
|
{ site: "https://finance", config: y },
|
|
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: B },
|
|
492
|
+
{ site: "https://staging.wwos", config: B },
|
|
493
|
+
{ site: "https://www.9news", config: b },
|
|
494
|
+
{ site: "https://staging.9news", config: b },
|
|
495
495
|
{ site: "https://www.yourtv", config: y },
|
|
496
496
|
{ site: "https://staging.yourtv", config: y },
|
|
497
|
-
{ site: "https://9now", config:
|
|
497
|
+
{ site: "https://9now", config: x },
|
|
498
498
|
{ site: "https://creative-preview-an.com", config: y }
|
|
499
|
-
],
|
|
499
|
+
], u = () => {
|
|
500
500
|
const t = window.document.getElementById("logo-small");
|
|
501
|
-
t && (t.style.left =
|
|
502
|
-
}, I = () => {
|
|
503
|
-
let t = null;
|
|
504
|
-
return t = w.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
|
|
501
|
+
t && (t.style.left = E.logoSmallLeft, t.style.transform = E.logoSmallTransform, t.style.filter = E.logoSmallFilter), l(), M(), c.addEventListener("scroll", q), o = setTimeout(q, 50);
|
|
505
502
|
}, T = () => {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
503
|
+
let t = null;
|
|
504
|
+
return t = S.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
|
|
505
|
+
}, I = () => {
|
|
506
|
+
const t = c.location.href;
|
|
507
|
+
for (let s = 0; s < C.length; s += 1)
|
|
508
|
+
if (t.indexOf(C[s].site) >= 0)
|
|
509
|
+
return C[s].config;
|
|
510
|
+
}, M = () => {
|
|
511
511
|
if (!p) return;
|
|
512
512
|
const t = p.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
|
-
p.style, t >= 0 && t <=
|
|
525
|
-
},
|
|
526
|
-
if (!
|
|
513
|
+
t.width = "100%", t.height = `${n}px`, t.position = "relative";
|
|
514
|
+
}, l = () => {
|
|
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 = E.logoTop, t.left = E.logoLeft, t.transform = E.logoTransform, t.zIndex = "10000", t.pointerEvents = "none", E.zIndex && E.zIndex();
|
|
518
|
+
}, v = (t) => {
|
|
519
|
+
if (!k) return;
|
|
520
|
+
const s = k.style;
|
|
521
|
+
t === "big" && !window.bigActive ? (s.maxHeight = `${n}px`, s.minHeight = `${n}px`, s.position = "absolute", s.top = E.logoTop, s.zIndex = "10000", window.loadBig()) : t === "small" && !window.smallActive && (s.maxHeight = `${f}px`, s.minHeight = `${f}px`, s.position = "fixed", s.top = "0px", s.zIndex = "100000", window.loadSmall());
|
|
522
|
+
}, q = () => {
|
|
523
|
+
const t = c.scrollY;
|
|
524
|
+
p.style, t >= 0 && t <= g ? v("big") : t > g && (t > r ? v("small") : v("big"), r = t <= 0 ? 0 : t);
|
|
525
|
+
}, k = T(), E = I();
|
|
526
|
+
if (!E) return () => {
|
|
527
527
|
};
|
|
528
528
|
let o = null;
|
|
529
|
-
const
|
|
530
|
-
let
|
|
531
|
-
return
|
|
532
|
-
|
|
529
|
+
const g = w;
|
|
530
|
+
let r = 0;
|
|
531
|
+
return u(), () => {
|
|
532
|
+
c.removeEventListener("scroll", q), o && (clearTimeout(o), o = null);
|
|
533
533
|
};
|
|
534
|
-
},
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
return Math.pow(2, -10 *
|
|
538
|
-
},
|
|
539
|
-
const
|
|
534
|
+
}, Y = (w) => {
|
|
535
|
+
if (w === 0 || w === 1) return w;
|
|
536
|
+
const n = 2 * Math.PI / 3;
|
|
537
|
+
return Math.pow(2, -10 * w) * Math.sin((w * 10 - 0.75) * n) + 1;
|
|
538
|
+
}, U = (w, n = 50) => `linear(${Array.from({ length: n + 1 }, (p, c) => w(c / n)).map((p) => +p.toFixed(4)).join(", ")})`, j = U(Y), G = (w = {}) => {
|
|
539
|
+
const n = {
|
|
540
540
|
// Ad scroll zone
|
|
541
541
|
// How tall the ad container is — controls how long the ad stays in view.
|
|
542
542
|
// 100vh = scrolls away after one viewport height; 200vh = twice as long, etc.
|
|
@@ -605,77 +605,77 @@ const F = (v) => {
|
|
|
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
|
+
...w
|
|
609
|
+
}, f = window.frameElement ? window.frameElement : null;
|
|
610
|
+
if (!f) return () => {
|
|
611
611
|
};
|
|
612
612
|
const p = window.parent;
|
|
613
613
|
if (!p || p === window) return () => {
|
|
614
614
|
};
|
|
615
|
-
let
|
|
615
|
+
let c = null;
|
|
616
616
|
try {
|
|
617
|
-
|
|
617
|
+
c = p.document, p.location.href;
|
|
618
618
|
} catch {
|
|
619
619
|
return () => {
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
|
-
const
|
|
623
|
-
const
|
|
624
|
-
if (
|
|
625
|
-
let t =
|
|
626
|
-
for (; t && t !==
|
|
622
|
+
const i = (() => {
|
|
623
|
+
const r = c.querySelector("#adspot-mobile-mobile-3-above");
|
|
624
|
+
if (r) return r;
|
|
625
|
+
let t = f.parentElement;
|
|
626
|
+
for (; t && t !== c.body; ) {
|
|
627
627
|
if (t.id && t.id.includes("adspot")) return t;
|
|
628
628
|
t = t.parentElement;
|
|
629
629
|
}
|
|
630
|
-
return
|
|
630
|
+
return f.parentElement;
|
|
631
631
|
})();
|
|
632
|
-
if (!
|
|
632
|
+
if (!i) return () => {
|
|
633
633
|
};
|
|
634
|
-
const y =
|
|
634
|
+
const y = i.getAttribute("style"), x = f.getAttribute("style"), A = {
|
|
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",
|
|
647
647
|
pointerEvents: "none"
|
|
648
648
|
};
|
|
649
649
|
(() => {
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
const t =
|
|
650
|
+
const r = i.style;
|
|
651
|
+
r.height = n.adScrollHeight, r.position = "relative", r.clipPath = `inset(-${n.bandHeight}px 0 0 0)`, r.overflow = "visible", r.width = "100vw", r.maxWidth = "100vw", r.marginLeft = "calc(50% - 50vw)", r.marginRight = "0", r.marginTop = "0", r.marginBottom = "0", r.padding = "0";
|
|
652
|
+
const t = f.style;
|
|
653
653
|
t.position = "fixed", t.top = "0", t.left = "0", t.width = "100vw", t.height = "100vh", t.maxWidth = "100vw", t.margin = "0", t.padding = "0", t.border = "none", t.zIndex = "1";
|
|
654
|
-
const
|
|
655
|
-
|
|
654
|
+
const s = i.previousElementSibling, m = c.createElement("div");
|
|
655
|
+
m.id = "interscroller-top-band-wrapper", Object.assign(m.style, {
|
|
656
656
|
position: "sticky",
|
|
657
657
|
bottom: "0",
|
|
658
658
|
width: "100vw",
|
|
659
659
|
marginLeft: "calc(50% - 50vw)",
|
|
660
|
-
zIndex:
|
|
660
|
+
zIndex: n.zIndexTop,
|
|
661
661
|
pointerEvents: "none"
|
|
662
662
|
});
|
|
663
|
-
const
|
|
664
|
-
|
|
663
|
+
const h = c.createElement("div");
|
|
664
|
+
h.id = "interscroller-top-band", h.textContent = n.labelTop, Object.assign(h.style, A, {
|
|
665
665
|
position: "relative",
|
|
666
666
|
// wrapper is the sticky anchor
|
|
667
667
|
width: "100%",
|
|
668
668
|
// wrapper handles the full-bleed breakout
|
|
669
669
|
marginLeft: "0",
|
|
670
670
|
transformOrigin: "top center"
|
|
671
|
-
}),
|
|
672
|
-
const e =
|
|
673
|
-
e.id = "interscroller-bottom-band", Object.assign(e.style,
|
|
671
|
+
}), m.appendChild(h), s ? s.appendChild(m) : i.parentElement.insertBefore(m, i);
|
|
672
|
+
const e = c.createElement("div");
|
|
673
|
+
e.id = "interscroller-bottom-band", Object.assign(e.style, A, {
|
|
674
674
|
position: "fixed",
|
|
675
675
|
// stays fixed; transform slides it in/out
|
|
676
676
|
bottom: "0",
|
|
677
677
|
left: "0",
|
|
678
|
-
zIndex:
|
|
678
|
+
zIndex: n.zIndexBottom,
|
|
679
679
|
display: "flex",
|
|
680
680
|
// always rendered — no display toggling
|
|
681
681
|
overflow: "hidden",
|
|
@@ -685,54 +685,170 @@ const F = (v) => {
|
|
|
685
685
|
transition: "none"
|
|
686
686
|
// no animation on first paint
|
|
687
687
|
});
|
|
688
|
-
const
|
|
689
|
-
if (
|
|
690
|
-
const
|
|
691
|
-
|
|
688
|
+
const a = c.createElement("span");
|
|
689
|
+
if (a.id = "interscroller-bottom-label", a.textContent = n.labelBottomResume, a.style.cssText = "position:relative;z-index:1;pointer-events:none;", e.appendChild(a), n.progressBarColor) {
|
|
690
|
+
const d = c.createElement("span");
|
|
691
|
+
d.id = "interscroller-bottom-progress", d.style.cssText = [
|
|
692
692
|
"position:absolute",
|
|
693
693
|
"inset:0",
|
|
694
694
|
"width:0%",
|
|
695
|
-
`background:${
|
|
695
|
+
`background:${n.progressBarColor}`,
|
|
696
696
|
"transition:none",
|
|
697
697
|
"z-index:0",
|
|
698
698
|
"pointer-events:none"
|
|
699
|
-
].join(";"), e.appendChild(
|
|
699
|
+
].join(";"), e.appendChild(d);
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
i.after(e);
|
|
702
702
|
})();
|
|
703
|
-
const
|
|
704
|
-
let
|
|
705
|
-
const o = (
|
|
706
|
-
if (!
|
|
707
|
-
const
|
|
708
|
-
!
|
|
709
|
-
const
|
|
710
|
-
!
|
|
703
|
+
const b = c.querySelector("#interscroller-top-band"), C = c.querySelector("#interscroller-top-band-wrapper"), u = c.querySelector("#interscroller-bottom-band"), T = c.querySelector("#interscroller-bottom-label"), I = c.querySelector("#interscroller-bottom-progress"), M = n.bandHeight, l = n.snapPx;
|
|
704
|
+
let v = !1, q = !1, k = !1, E = !1;
|
|
705
|
+
const o = (n.thresholds || []).map(() => !1), g = () => {
|
|
706
|
+
if (!u) return;
|
|
707
|
+
const r = i.getBoundingClientRect(), t = p.innerHeight, s = r.top <= t, m = r.bottom <= t - M, h = E ? r.top <= t - n.bottomBandHideAt : r.top <= t - n.bottomBandShowAt, e = i.offsetHeight, a = Math.min(1, Math.max(0, (t - r.top) / (e + t))), d = Math.min(1, Math.max(0, (t - r.top) / (e + M))), N = Math.min(1, Math.max(0, (t - r.top) / e)), L = Math.min(r.bottom, t) - Math.max(r.top - M, 0), z = Math.min(1, Math.max(0, L / t)), D = Math.max(0, Math.round(r.bottom - t));
|
|
708
|
+
!q && s && n.onEnter && n.onEnter(), !k && m && n.onExit && n.onExit(), q = s, k = m, E = h, n.onProgress && n.onProgress({ scrollProgress: a, adExposure: N, viewportCoverage: z, pxRemaining: D }), (n.thresholds || []).forEach((P, $) => {
|
|
709
|
+
const _ = o[$], F = a >= P.at;
|
|
710
|
+
!_ && F ? (o[$] = !0, P.onEnter && P.onEnter(a)) : _ && !F && (o[$] = !1, P.onLeave && P.onLeave(a));
|
|
711
711
|
});
|
|
712
|
-
const
|
|
713
|
-
if (
|
|
714
|
-
const P =
|
|
715
|
-
if (!
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
} else !
|
|
719
|
-
} else
|
|
720
|
-
const
|
|
721
|
-
|
|
712
|
+
const H = t;
|
|
713
|
+
if (b && r.top <= H + n.stretchOverlap && !m) {
|
|
714
|
+
const P = H - r.top;
|
|
715
|
+
if (!v && P <= l - n.snapOverlap) {
|
|
716
|
+
const $ = 1 + Math.max(0, P + n.stretchOverlap) / M;
|
|
717
|
+
b.style.transition = "none", b.style.transform = `scaleY(${$})`;
|
|
718
|
+
} else !v && P > l - n.snapOverlap && (v = !0, b.style.transition = `transform ${n.snapDuration}s ${n.snapEase}`, b.style.transform = "scaleY(1)");
|
|
719
|
+
} else b && r.top > H + n.stretchOverlap && (v = !1, b.style.transition = "none", b.style.transform = "scaleY(1)");
|
|
720
|
+
const R = p.visualViewport ? Math.round(p.innerHeight - (p.visualViewport.offsetTop + p.visualViewport.height)) : 0;
|
|
721
|
+
m ? (u.style.transition = "none", u.style.transform = "none", u.style.position = "sticky", u.style.top = "0", u.style.bottom = "", u.style.left = "", u.style.marginLeft = "calc(50% - 50vw)", u.style.width = "100vw", T && (T.textContent = n.labelBottomNow), I && (I.style.width = "100%")) : h ? (T && (T.textContent = D > 0 ? d < 0.2 ? n.labelBottomResume : d < 0.75 ? n.labelBottomMid : n.labelBottomLate : n.labelBottomNow), I && (I.style.width = `${Math.round(d * 100)}%`), u.style.transition = "transform 0.3s ease", u.style.transform = "translateY(0)", u.style.position = "fixed", u.style.bottom = `${R}px`, u.style.top = "", u.style.left = "0", u.style.marginLeft = "0", u.style.width = "100vw") : (u.style.transition = "transform 0.3s ease", u.style.transform = "translateY(100%)", u.style.position = "fixed", u.style.bottom = `${R}px`, u.style.left = "0", u.style.marginLeft = "0", u.style.width = "100vw");
|
|
722
|
+
};
|
|
723
|
+
return g(), p.addEventListener("scroll", g, { passive: !0 }), p.visualViewport?.addEventListener("resize", g, { passive: !0 }), () => {
|
|
724
|
+
p.removeEventListener("scroll", g), p.visualViewport?.removeEventListener("resize", g), C ? C.remove() : b && b.remove(), u && u.remove(), y ? i.setAttribute("style", y) : i.removeAttribute("style"), x ? f.setAttribute("style", x) : f.removeAttribute("style");
|
|
725
|
+
};
|
|
726
|
+
}, K = (w = {}) => {
|
|
727
|
+
const n = {
|
|
728
|
+
// Expansion dimensions
|
|
729
|
+
expandToWidth: "100vw",
|
|
730
|
+
// target width — '100vw' | px string | false
|
|
731
|
+
expandToHeight: "250px",
|
|
732
|
+
// target height — '100vh' | px string | false
|
|
733
|
+
// Timing
|
|
734
|
+
expandDuration: 0.45,
|
|
735
|
+
// seconds
|
|
736
|
+
collapseDuration: 0.3,
|
|
737
|
+
// seconds
|
|
738
|
+
expandDelay: 0.15,
|
|
739
|
+
// seconds delay after viewport entry before expanding
|
|
740
|
+
// Easing (CSS transition-timing-function)
|
|
741
|
+
expandEase: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
742
|
+
collapseEase: "cubic-bezier(0.4, 0, 0.6, 1)",
|
|
743
|
+
// Stacking
|
|
744
|
+
zIndex: 10,
|
|
745
|
+
// "ADVERTISEMENT" label band above the slot
|
|
746
|
+
showBand: !0,
|
|
747
|
+
bandHeight: 20,
|
|
748
|
+
bandBg: "#222",
|
|
749
|
+
bandColor: "#fff",
|
|
750
|
+
bandFontSize: "10px",
|
|
751
|
+
bandFontFamily: "Arial, Helvetica, sans-serif",
|
|
752
|
+
bandLetterSpacing: "1px",
|
|
753
|
+
labelTop: "Advertisement",
|
|
754
|
+
// Auto-expand triggers
|
|
755
|
+
autoExpand: !0,
|
|
756
|
+
expandThreshold: 0.5,
|
|
757
|
+
// fraction of the slot visible before auto-expand fires
|
|
758
|
+
// Callbacks
|
|
759
|
+
onExpand: null,
|
|
760
|
+
onCollapse: null,
|
|
761
|
+
// Merge caller-supplied options
|
|
762
|
+
...w
|
|
763
|
+
}, f = window.frameElement ?? null;
|
|
764
|
+
if (!f) return () => {
|
|
722
765
|
};
|
|
723
|
-
|
|
724
|
-
|
|
766
|
+
const p = window.parent;
|
|
767
|
+
if (!p || p === window) return () => {
|
|
768
|
+
};
|
|
769
|
+
let c = null;
|
|
770
|
+
try {
|
|
771
|
+
c = p.document, p.location.href;
|
|
772
|
+
} catch {
|
|
773
|
+
return () => {
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
const i = (() => {
|
|
777
|
+
let l = f.parentElement;
|
|
778
|
+
for (; l && l !== c.body; ) {
|
|
779
|
+
if (l.id && l.id.includes("adspot")) return l;
|
|
780
|
+
l = l.parentElement;
|
|
781
|
+
}
|
|
782
|
+
return f.parentElement;
|
|
783
|
+
})();
|
|
784
|
+
if (!i) return () => {
|
|
785
|
+
};
|
|
786
|
+
const y = i.getAttribute("style"), x = f.getAttribute("style"), A = (l) => {
|
|
787
|
+
const v = [];
|
|
788
|
+
n.expandToWidth && v.push(`width ${l}s`, `max-width ${l}s`, `margin-left ${l}s`), n.expandToHeight && v.push(`height ${l}s`);
|
|
789
|
+
const q = l === n.expandDuration ? n.expandEase : n.collapseEase;
|
|
790
|
+
return v.map((k) => `${k} ${q}`).join(", ");
|
|
791
|
+
};
|
|
792
|
+
let B = !1, b = null, C = null;
|
|
793
|
+
const u = () => {
|
|
794
|
+
const l = i.style;
|
|
795
|
+
l.position = "relative", l.overflow = "visible", l.transition = A(n.expandDuration), l.boxSizing = "border-box";
|
|
796
|
+
const v = f.style;
|
|
797
|
+
if (v.display = "block", v.width = "100%", v.height = "100%", v.border = "none", v.margin = "0", v.padding = "0", n.showBand) {
|
|
798
|
+
const q = c.createElement("div");
|
|
799
|
+
q.id = "liquidframe-band", Object.assign(q.style, {
|
|
800
|
+
width: "100%",
|
|
801
|
+
height: n.bandHeight + "px",
|
|
802
|
+
backgroundColor: n.bandBg,
|
|
803
|
+
color: n.bandColor,
|
|
804
|
+
fontSize: n.bandFontSize,
|
|
805
|
+
fontFamily: n.bandFontFamily,
|
|
806
|
+
textTransform: "uppercase",
|
|
807
|
+
letterSpacing: n.bandLetterSpacing,
|
|
808
|
+
display: "flex",
|
|
809
|
+
alignItems: "center",
|
|
810
|
+
justifyContent: "center",
|
|
811
|
+
pointerEvents: "none"
|
|
812
|
+
}), q.textContent = n.labelTop, i.insertAdjacentElement("beforebegin", q);
|
|
813
|
+
}
|
|
814
|
+
}, T = () => {
|
|
815
|
+
if (B) return;
|
|
816
|
+
B = !0;
|
|
817
|
+
const l = i.style;
|
|
818
|
+
l.transition = A(n.expandDuration), l.zIndex = String(n.zIndex), n.expandToWidth && (l.width = n.expandToWidth, l.maxWidth = n.expandToWidth, (n.expandToWidth === "100vw" || n.expandToWidth.endsWith("vw")) && (l.marginLeft = "calc(50% - 50vw)", l.marginRight = "0")), n.expandToHeight && (l.height = n.expandToHeight), n.onExpand && setTimeout(n.onExpand, n.expandDuration * 1e3);
|
|
819
|
+
}, I = () => {
|
|
820
|
+
if (!B) return;
|
|
821
|
+
B = !1;
|
|
822
|
+
const l = i.style;
|
|
823
|
+
l.transition = A(n.collapseDuration), l.width = "320px", l.maxWidth = "320px", l.height = "50px", l.marginLeft = "", l.marginRight = "", l.zIndex = "", n.onCollapse && setTimeout(n.onCollapse, n.collapseDuration * 1e3);
|
|
824
|
+
};
|
|
825
|
+
u(), n.autoExpand && (b = new p.IntersectionObserver(
|
|
826
|
+
(l) => {
|
|
827
|
+
l.forEach((v) => {
|
|
828
|
+
v.isIntersecting && !B && (n.expandDelay > 0 ? C = setTimeout(T, n.expandDelay * 1e3) : T(), b.disconnect(), b = null);
|
|
829
|
+
});
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
root: null,
|
|
833
|
+
threshold: n.expandThreshold
|
|
834
|
+
}
|
|
835
|
+
), b.observe(i));
|
|
836
|
+
const M = () => {
|
|
837
|
+
b && (b.disconnect(), b = null), C && (clearTimeout(C), C = null);
|
|
838
|
+
const l = c.querySelector("#liquidframe-band");
|
|
839
|
+
l && l.remove(), y ? i.setAttribute("style", y) : i.removeAttribute("style"), x ? f.setAttribute("style", x) : f.removeAttribute("style");
|
|
725
840
|
};
|
|
841
|
+
return M.expand = T, M.collapse = I, M;
|
|
726
842
|
};
|
|
727
|
-
let
|
|
843
|
+
let O = () => {
|
|
728
844
|
};
|
|
729
|
-
function
|
|
730
|
-
typeof
|
|
731
|
-
let
|
|
845
|
+
function J({ adFormat: w = "", stickyOffset: n = 0, logoPosX: f = 0, logoHeight: p = 0, logoSmallHeight: c = 0, ...S } = {}) {
|
|
846
|
+
typeof O == "function" && O();
|
|
847
|
+
let i = () => {
|
|
732
848
|
};
|
|
733
|
-
return
|
|
734
|
-
},
|
|
849
|
+
return w === "fireplace" ? i = W(n) : w === "fireplace-collant" ? i = V(n) : w === "logomorph" ? i = X(f, p, c) : w === "interscroller" ? i = G(S) : w === "liquidframe" ? i = K(S) : console.warn("[powered-ad-config] Unknown ad format:", w), O = typeof i == "function" ? i : () => {
|
|
850
|
+
}, O;
|
|
735
851
|
}
|
|
736
852
|
export {
|
|
737
|
-
|
|
853
|
+
J as default
|
|
738
854
|
};
|