powered-ad-config 0.0.14 → 0.0.16
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const z = (h) => {
|
|
2
|
+
const w = window.frameElement ? window.frameElement : null, a = {
|
|
3
3
|
siteBackgroundColor: "#ffffff",
|
|
4
4
|
fireplaceLeftMargin: 0,
|
|
5
5
|
adNodeMarginTop: -24,
|
|
6
|
-
adNodeMarginBottom:
|
|
6
|
+
adNodeMarginBottom: 24,
|
|
7
7
|
responsiveScroll: -124,
|
|
8
8
|
xPosHalfpage: function() {
|
|
9
9
|
return 695;
|
|
@@ -13,9 +13,9 @@ const L = (S) => {
|
|
|
13
13
|
},
|
|
14
14
|
stickyMargin: { offset: 72, isSticky: !0 },
|
|
15
15
|
zIndex: function() {
|
|
16
|
-
var o, i, n,
|
|
17
|
-
const t = window.parent.document, e = (x,
|
|
18
|
-
(o = t.querySelector(".nk-demographics")) == null || o.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), (i = t.querySelector(".nk-footer")) == null || i.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), (n = t.querySelector("article")) == null || n.setAttribute("style", "position:relative"), (
|
|
16
|
+
var o, i, n, r, s, l, c, f, d, u, v;
|
|
17
|
+
const t = window.parent.document, e = (x, A) => x.forEach((q) => A.forEach(([k, L]) => q.style[k] = L));
|
|
18
|
+
(o = t.querySelector(".nk-demographics")) == null || o.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), (i = t.querySelector(".nk-footer")) == null || i.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), (n = t.querySelector("article")) == null || n.setAttribute("style", "position:relative"), (r = t.querySelector("#article")) == null || r.setAttribute("style", "position:relative"), (s = t.querySelector("#VideoIndex")) == null || s.setAttribute("style", "position:relative"), (l = t.querySelector("#Index")) == null || l.setAttribute("style", "position:relative"), (c = t.querySelector(".show")) == null || c.setAttribute("style", "position:relative"), (f = t.querySelector("#adspot-desktop-banner-7-below")) == null || f.setAttribute("style", "position:relative"), e(t.querySelectorAll(".column"), [["position", "relative"]]), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(t.querySelectorAll("blockquote"), [["zIndex", "1"]]), (d = t.querySelector('div[class*="article__MyContainer"]')) == null || d.setAttribute("style", "max-width:1190px;margin-top:-24px"), (u = t.querySelector('div[type="BANNER"]')) == null || u.setAttribute("style", "display:none"), (v = t.querySelector('div[type="MBANNER"]')) == null || v.setAttribute("style", "display:none");
|
|
19
19
|
}
|
|
20
20
|
}, p = {
|
|
21
21
|
siteBackgroundColor: "#ffffff",
|
|
@@ -31,23 +31,23 @@ const L = (S) => {
|
|
|
31
31
|
},
|
|
32
32
|
stickyMargin: { offset: 32, isSticky: !0 },
|
|
33
33
|
zIndex: function() {
|
|
34
|
-
var o, i, n,
|
|
35
|
-
const t = window.parent.document, e = (
|
|
36
|
-
(o = t.querySelector(".nk-demographics")) == null || o.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), (i = t.querySelector(".nk-footer")) == null || i.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), (n = t.querySelector("article")) == null || n.setAttribute("style", "position:relative"), (
|
|
34
|
+
var o, i, n, r, s, l, c, f, d, u;
|
|
35
|
+
const t = window.parent.document, e = (v, x) => v.forEach((A) => x.forEach(([q, k]) => A.style[q] = k));
|
|
36
|
+
(o = t.querySelector(".nk-demographics")) == null || o.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), (i = t.querySelector(".nk-footer")) == null || i.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), (n = t.querySelector("article")) == null || n.setAttribute("style", "position:relative"), (r = t.querySelector("#article")) == null || r.setAttribute("style", "position:relative"), (s = t.querySelector("#VideoIndex")) == null || s.setAttribute("style", "position:relative"), (l = t.querySelector("#Index")) == null || l.setAttribute("style", "position:relative"), (c = t.querySelector(".show")) == null || c.setAttribute("style", "position:relative"), e(t.querySelectorAll(".column"), [["position", "relative"]]), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(t.querySelectorAll("blockquote"), [["zIndex", "1"]]), (f = t.querySelector('div[class^="component__StrapContainer"]')) == null || f.setAttribute("style", "position:relative"), (d = t.querySelector('section[class^="WatchNow__Container"]')) == null || d.setAttribute("style", "margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"), (u = t.querySelector('div[class*="ArticleContainer"]')) == null || u.setAttribute("style", "max-width:1190px;margin-top:0px");
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, m = {
|
|
39
39
|
siteBackgroundColor: "#ffffff",
|
|
40
40
|
fireplaceLeftMargin: 0,
|
|
41
41
|
adNodeMarginTop: -24,
|
|
42
|
-
adNodeMarginBottom: -
|
|
42
|
+
adNodeMarginBottom: -13,
|
|
43
43
|
responsiveScroll: -120,
|
|
44
44
|
xPosHalfpage: 722,
|
|
45
45
|
yPosHalfpage: 32,
|
|
46
46
|
stickyMargin: { offset: 8, isSticky: !0 },
|
|
47
47
|
zIndex: function() {
|
|
48
|
-
var o, i, n,
|
|
48
|
+
var o, i, n, r, s, l;
|
|
49
49
|
const t = window.parent.document;
|
|
50
|
-
if ((o = t.querySelector('section[data-section="marketing-banner"]')) == null || o.setAttribute("style", "position:relative"), (n = (i = t.querySelector('div[data-testid="live-tv"]')) == null ? void 0 : i.parentNode) == null || n.setAttribute("style", "position:relative"), (
|
|
50
|
+
if ((o = t.querySelector('section[data-section="marketing-banner"]')) == null || o.setAttribute("style", "position:relative"), (n = (i = t.querySelector('div[data-testid="live-tv"]')) == null ? void 0 : i.parentNode) == null || n.setAttribute("style", "position:relative"), (s = (r = t.querySelector('div[data-contentunit-id="stan"]')) == null ? void 0 : r.parentNode) == null || s.setAttribute("style", "position:relative"), (l = t.querySelector("small")) == null || l.setAttribute("style", "position:inherit"), t.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
51
51
|
let c = t.createElement("style");
|
|
52
52
|
c.innerHTML = `
|
|
53
53
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
@@ -56,7 +56,7 @@ const L = (S) => {
|
|
|
56
56
|
`, t.head.appendChild(c);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, S = {
|
|
60
60
|
siteBackgroundColor: "#ffffff",
|
|
61
61
|
fireplaceLeftMargin: 0,
|
|
62
62
|
adNodeMarginTop: -24,
|
|
@@ -76,11 +76,25 @@ const L = (S) => {
|
|
|
76
76
|
`, t.head.appendChild(n);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
}, C = {
|
|
80
|
+
siteBackgroundColor: "#f7f7f7",
|
|
81
|
+
fireplaceLeftMargin: 0,
|
|
82
|
+
adNodeMarginTop: -25,
|
|
83
|
+
adNodeMarginBottom: 0,
|
|
84
|
+
responsiveScroll: -124,
|
|
85
|
+
xPosHalfpage: 720,
|
|
86
|
+
yPosHalfpage: 32,
|
|
87
|
+
stickyMargin: { offset: 104, isSticky: !0 },
|
|
88
|
+
zIndex: function() {
|
|
89
|
+
var o, i, n, r, s;
|
|
90
|
+
const t = window.parent.document, e = (l, c) => l.forEach((f) => c.forEach(([d, u]) => f.style[d] = u));
|
|
91
|
+
(o = t.querySelector(".container--padded")) == null || o.setAttribute("style", "position:relative"), e(t.querySelectorAll(".advert"), [["position", "relative"]]), (i = t.querySelector(".footer-netkit")) == null || i.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), (n = t.querySelector('div[type="BANNER"]')) == null || n.setAttribute("style", "display:none"), (r = t.querySelector('div[type="MBANNER"]')) == null || r.setAttribute("style", "display:none"), (s = t.querySelector('div[id*="sidepanel"][id*="above"]')) == null || s.setAttribute("style", "display:none");
|
|
92
|
+
}
|
|
79
93
|
}, M = {
|
|
80
94
|
siteBackgroundColor: "#ffffff",
|
|
81
95
|
fireplaceLeftMargin: 0,
|
|
82
96
|
adNodeMarginTop: -32,
|
|
83
|
-
adNodeMarginBottom:
|
|
97
|
+
adNodeMarginBottom: 18,
|
|
84
98
|
responsiveScroll: -124,
|
|
85
99
|
xPosHalfpage: function() {
|
|
86
100
|
return 720;
|
|
@@ -90,69 +104,69 @@ const L = (S) => {
|
|
|
90
104
|
},
|
|
91
105
|
stickyMargin: { offset: 16, isSticky: !0 },
|
|
92
106
|
zIndex: function() {
|
|
93
|
-
var e, o, i, n,
|
|
107
|
+
var e, o, i, n, r, s;
|
|
94
108
|
const t = window.parent.document;
|
|
95
|
-
(e = t.querySelector(".header-wrapper")) == null || e.setAttribute("style", "height:124px"), (o = t.querySelector(".weather-widget-wrapper")) == null || o.setAttribute("style", "bottom:0px"), (i = t.querySelector(".content")) == null || i.setAttribute("style", "padding-top:32px"), (n = t.querySelector(".layout")) == null || n.setAttribute("style", "position:relative;background-color:transparent;"), (
|
|
109
|
+
(e = t.querySelector(".header-wrapper")) == null || e.setAttribute("style", "height:124px"), (o = t.querySelector(".weather-widget-wrapper")) == null || o.setAttribute("style", "bottom:0px"), (i = t.querySelector(".content")) == null || i.setAttribute("style", "padding-top:32px"), (n = t.querySelector(".layout")) == null || n.setAttribute("style", "position:relative;background-color:transparent;"), (r = t.querySelector(".footer-ad")) == null || r.setAttribute("style", "position:relative"), (s = t.querySelector(".footer-netkit")) == null || s.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
|
|
96
110
|
}
|
|
97
111
|
}, b = [
|
|
98
|
-
{ site: "https://www.nine.com.au/sport", config:
|
|
112
|
+
{ site: "https://www.nine.com.au/sport", config: S },
|
|
99
113
|
{ site: "https://www.nine.com.au/product-reviews", config: p },
|
|
100
114
|
{ site: "https://www.nine.com.au/property", config: p },
|
|
101
115
|
{ site: "https://www.nine.com.au/entertainment", config: p },
|
|
102
|
-
{ site: "https://staging.nine.com.au/sport", config:
|
|
116
|
+
{ site: "https://staging.nine.com.au/sport", config: S },
|
|
103
117
|
{ site: "https://staging.nine.com.au/product-reviews", config: p },
|
|
104
118
|
{ site: "https://staging.nine.com.au/property", config: p },
|
|
105
119
|
{ site: "https://staging.nine.com.au/entertainment", config: p },
|
|
106
|
-
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config:
|
|
107
|
-
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config:
|
|
108
|
-
{ site: "https://preview.nine.com.au/", config:
|
|
109
|
-
{ site: "https://www.nine", config:
|
|
110
|
-
{ site: "https://staging.nine", config:
|
|
111
|
-
{ site: "https://entertainment", config:
|
|
112
|
-
{ site: "https://celebrity", config:
|
|
113
|
-
{ site: "https://homes", config:
|
|
114
|
-
{ site: "https://travel", config:
|
|
115
|
-
{ site: "https://honey", config:
|
|
116
|
-
{ site: "https://style", config:
|
|
117
|
-
{ site: "https://coach", config:
|
|
118
|
-
{ site: "https://kitchen", config:
|
|
119
|
-
{ site: "https://finance", config:
|
|
120
|
-
{ site: "https://wwos", config:
|
|
121
|
-
{ site: "https://staging.wwos", config:
|
|
120
|
+
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: m },
|
|
121
|
+
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: m },
|
|
122
|
+
{ site: "https://preview.nine.com.au/", config: m },
|
|
123
|
+
{ site: "https://www.nine", config: m },
|
|
124
|
+
{ site: "https://staging.nine", config: m },
|
|
125
|
+
{ site: "https://entertainment", config: a },
|
|
126
|
+
{ site: "https://celebrity", config: a },
|
|
127
|
+
{ site: "https://homes", config: a },
|
|
128
|
+
{ site: "https://travel", config: a },
|
|
129
|
+
{ site: "https://honey", config: a },
|
|
130
|
+
{ site: "https://style", config: a },
|
|
131
|
+
{ site: "https://coach", config: a },
|
|
132
|
+
{ site: "https://kitchen", config: a },
|
|
133
|
+
{ site: "https://finance", config: a },
|
|
134
|
+
{ site: "https://wwos", config: C },
|
|
135
|
+
{ site: "https://staging.wwos", config: S },
|
|
122
136
|
{ site: "https://www.9news", config: M },
|
|
123
137
|
{ site: "https://staging.9news", config: M },
|
|
124
|
-
{ site: "https://www.yourtv", config:
|
|
125
|
-
{ site: "https://staging.yourtv", config:
|
|
138
|
+
{ site: "https://www.yourtv", config: a },
|
|
139
|
+
{ site: "https://staging.yourtv", config: a },
|
|
126
140
|
{ site: "https://9now", config: p },
|
|
127
|
-
{ site: "https://creative-preview-an.com", config:
|
|
128
|
-
],
|
|
141
|
+
{ site: "https://creative-preview-an.com", config: a }
|
|
142
|
+
], I = () => {
|
|
129
143
|
const t = window.document.getElementById("nineContent");
|
|
130
|
-
t && (t.style.backgroundColor =
|
|
131
|
-
},
|
|
144
|
+
t && (t.style.backgroundColor = y.siteBackgroundColor), T(), D(), window.parent.window.addEventListener("scroll", N), setTimeout(N, 50);
|
|
145
|
+
}, P = () => {
|
|
132
146
|
let t = null;
|
|
133
147
|
return window.parent && (t = window.parent.document.querySelector('div[id*="billboard"][id*="above"]')), t;
|
|
134
|
-
},
|
|
148
|
+
}, H = () => {
|
|
135
149
|
const t = window.parent.location.href;
|
|
136
150
|
for (let e = 0; e < b.length; e += 1)
|
|
137
151
|
if (t.indexOf(b[e].site) >= 0)
|
|
138
152
|
return b[e].config;
|
|
139
153
|
}, D = () => {
|
|
140
|
-
if (!
|
|
141
|
-
const t =
|
|
154
|
+
if (!w) return;
|
|
155
|
+
const t = w.style;
|
|
142
156
|
t.width = "100%", t.height = "1000px", t.position = "fixed", t.left = "50%", t.transform = "translate(-50%, 0)";
|
|
143
|
-
},
|
|
144
|
-
if (!
|
|
145
|
-
const t =
|
|
146
|
-
t.minHeight = "250px", t.marginTop =
|
|
147
|
-
},
|
|
148
|
-
const e = window.parent.scrollY, o =
|
|
149
|
-
e >= 0 && e <=
|
|
150
|
-
},
|
|
151
|
-
|
|
157
|
+
}, T = () => {
|
|
158
|
+
if (!B) return;
|
|
159
|
+
const t = B.style;
|
|
160
|
+
t.minHeight = "250px", t.marginTop = y.adNodeMarginTop + "px", t.marginBottom = y.adNodeMarginBottom + "px", t.position = "static", t.display = "block", window.parent && y.zIndex && y.zIndex();
|
|
161
|
+
}, N = (t) => {
|
|
162
|
+
const e = window.parent.scrollY, o = w.style, i = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
163
|
+
e >= 0 && e <= g ? (o.transform = `translate(-50%, ${-e}px)`, i.transform = "translateY(0)") : e > g && e <= E ? (o.transform = `translate(-50%, ${-g}px)`, i.transform = `translateY(${g - e}px)`) : e > E && (o.transform = `translate(-50%, ${-g}px)`, i.transform = "translateY(-250px)");
|
|
164
|
+
}, B = P(), y = H(), g = -y.responsiveScroll + h, E = g + 250;
|
|
165
|
+
I();
|
|
152
166
|
};
|
|
153
|
-
function
|
|
154
|
-
|
|
167
|
+
function _({ adFormat: h = "", stickyOffset: w = 0 } = {}) {
|
|
168
|
+
h === "fireplace" && z(w);
|
|
155
169
|
}
|
|
156
170
|
export {
|
|
157
|
-
|
|
171
|
+
_ as default
|
|
158
172
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(m,w){typeof exports=="object"&&typeof module<"u"?module.exports=w():typeof define=="function"&&define.amd?define(w):(m=typeof globalThis<"u"?globalThis:m||self,m.poweredAdConfig=w())})(this,function(){"use strict";const m=b=>{const v=window.frameElement?window.frameElement:null,a={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:function(){return 695},yPosHalfpage:function(){return 72},stickyMargin:{offset:72,isSticky:!0},zIndex:function(){var o,i,n,r,s,l,c,f,d,u,S;const t=window.parent.document,e=(q,k)=>q.forEach(M=>k.forEach(([N,_])=>M.style[N]=_));(o=t.querySelector(".nk-demographics"))==null||o.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),(i=t.querySelector(".nk-footer"))==null||i.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),(n=t.querySelector("article"))==null||n.setAttribute("style","position:relative"),(r=t.querySelector("#article"))==null||r.setAttribute("style","position:relative"),(s=t.querySelector("#VideoIndex"))==null||s.setAttribute("style","position:relative"),(l=t.querySelector("#Index"))==null||l.setAttribute("style","position:relative"),(c=t.querySelector(".show"))==null||c.setAttribute("style","position:relative"),(f=t.querySelector("#adspot-desktop-banner-7-below"))==null||f.setAttribute("style","position:relative"),e(t.querySelectorAll(".column"),[["position","relative"]]),e(t.querySelectorAll(".advert"),[["position","relative"]]),e(t.querySelectorAll("blockquote"),[["zIndex","1"]]),(d=t.querySelector('div[class*="article__MyContainer"]'))==null||d.setAttribute("style","max-width:1190px;margin-top:-24px"),(u=t.querySelector('div[type="BANNER"]'))==null||u.setAttribute("style","display:none"),(S=t.querySelector('div[type="MBANNER"]'))==null||S.setAttribute("style","display:none")}},p={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:function(){return 695},yPosHalfpage:function(){return 32},stickyMargin:{offset:32,isSticky:!0},zIndex:function(){var o,i,n,r,s,l,c,f,d,u;const t=window.parent.document,e=(S,q)=>S.forEach(k=>q.forEach(([M,N])=>k.style[M]=N));(o=t.querySelector(".nk-demographics"))==null||o.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),(i=t.querySelector(".nk-footer"))==null||i.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),(n=t.querySelector("article"))==null||n.setAttribute("style","position:relative"),(r=t.querySelector("#article"))==null||r.setAttribute("style","position:relative"),(s=t.querySelector("#VideoIndex"))==null||s.setAttribute("style","position:relative"),(l=t.querySelector("#Index"))==null||l.setAttribute("style","position:relative"),(c=t.querySelector(".show"))==null||c.setAttribute("style","position:relative"),e(t.querySelectorAll(".column"),[["position","relative"]]),e(t.querySelectorAll(".advert"),[["position","relative"]]),e(t.querySelectorAll("blockquote"),[["zIndex","1"]]),(f=t.querySelector('div[class^="component__StrapContainer"]'))==null||f.setAttribute("style","position:relative"),(d=t.querySelector('section[class^="WatchNow__Container"]'))==null||d.setAttribute("style","margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"),(u=t.querySelector('div[class*="ArticleContainer"]'))==null||u.setAttribute("style","max-width:1190px;margin-top:0px")}},h={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:-13,responsiveScroll:-120,xPosHalfpage:722,yPosHalfpage:32,stickyMargin:{offset:8,isSticky:!0},zIndex:function(){var o,i,n,r,s,l;const t=window.parent.document;if((o=t.querySelector('section[data-section="marketing-banner"]'))==null||o.setAttribute("style","position:relative"),(n=(i=t.querySelector('div[data-testid="live-tv"]'))==null?void 0:i.parentNode)==null||n.setAttribute("style","position:relative"),(s=(r=t.querySelector('div[data-contentunit-id="stan"]'))==null?void 0:r.parentNode)==null||s.setAttribute("style","position:relative"),(l=t.querySelector("small"))==null||l.setAttribute("style","position:inherit"),t.querySelector('div[id*="tablet"][id*="takeover"]')){let c=t.createElement("style");c.innerHTML=`
|
|
2
2
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
3
3
|
position: static;
|
|
4
4
|
}
|
|
5
|
-
`,t.head.appendChild(c)}}},
|
|
5
|
+
`,t.head.appendChild(c)}}},x={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:32,stickyMargin:{offset:104,isSticky:!0},zIndex:function(){const t=window.parent.document,o=t.querySelector("footer").previousElementSibling;if(o&&o.tagName.toLowerCase()==="div"&&(o.style.position="relative"),t.querySelector('div[id*="tablet"][id*="takeover"]')){let n=t.createElement("style");n.innerHTML=`
|
|
6
6
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
7
7
|
position: static;
|
|
8
8
|
}
|
|
9
|
-
`,t.head.appendChild(n)}}},
|
|
9
|
+
`,t.head.appendChild(n)}}},P={siteBackgroundColor:"#f7f7f7",fireplaceLeftMargin:0,adNodeMarginTop:-25,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:32,stickyMargin:{offset:104,isSticky:!0},zIndex:function(){var o,i,n,r,s;const t=window.parent.document,e=(l,c)=>l.forEach(f=>c.forEach(([d,u])=>f.style[d]=u));(o=t.querySelector(".container--padded"))==null||o.setAttribute("style","position:relative"),e(t.querySelectorAll(".advert"),[["position","relative"]]),(i=t.querySelector(".footer-netkit"))==null||i.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),(n=t.querySelector('div[type="BANNER"]'))==null||n.setAttribute("style","display:none"),(r=t.querySelector('div[type="MBANNER"]'))==null||r.setAttribute("style","display:none"),(s=t.querySelector('div[id*="sidepanel"][id*="above"]'))==null||s.setAttribute("style","display:none")}},B={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:18,responsiveScroll:-124,xPosHalfpage:function(){return 720},yPosHalfpage:function(){return 16},stickyMargin:{offset:16,isSticky:!0},zIndex:function(){var e,o,i,n,r,s;const t=window.parent.document;(e=t.querySelector(".header-wrapper"))==null||e.setAttribute("style","height:124px"),(o=t.querySelector(".weather-widget-wrapper"))==null||o.setAttribute("style","bottom:0px"),(i=t.querySelector(".content"))==null||i.setAttribute("style","padding-top:32px"),(n=t.querySelector(".layout"))==null||n.setAttribute("style","position:relative;background-color:transparent;"),(r=t.querySelector(".footer-ad"))==null||r.setAttribute("style","position:relative"),(s=t.querySelector(".footer-netkit"))==null||s.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);")}},A=[{site:"https://www.nine.com.au/sport",config:x},{site:"https://www.nine.com.au/product-reviews",config:p},{site:"https://www.nine.com.au/property",config:p},{site:"https://www.nine.com.au/entertainment",config:p},{site:"https://staging.nine.com.au/sport",config:x},{site:"https://staging.nine.com.au/product-reviews",config:p},{site:"https://staging.nine.com.au/property",config:p},{site:"https://staging.nine.com.au/entertainment",config:p},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:h},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:h},{site:"https://preview.nine.com.au/",config:h},{site:"https://www.nine",config:h},{site:"https://staging.nine",config:h},{site:"https://entertainment",config:a},{site:"https://celebrity",config:a},{site:"https://homes",config:a},{site:"https://travel",config:a},{site:"https://honey",config:a},{site:"https://style",config:a},{site:"https://coach",config:a},{site:"https://kitchen",config:a},{site:"https://finance",config:a},{site:"https://wwos",config:P},{site:"https://staging.wwos",config:x},{site:"https://www.9news",config:B},{site:"https://staging.9news",config:B},{site:"https://www.yourtv",config:a},{site:"https://staging.yourtv",config:a},{site:"https://9now",config:p},{site:"https://creative-preview-an.com",config:a}],T=()=>{const t=window.document.getElementById("nineContent");t&&(t.style.backgroundColor=y.siteBackgroundColor),z(),L(),window.parent.window.addEventListener("scroll",C),setTimeout(C,50)},H=()=>{let t=null;return window.parent&&(t=window.parent.document.querySelector('div[id*="billboard"][id*="above"]')),t},D=()=>{const t=window.parent.location.href;for(let e=0;e<A.length;e+=1)if(t.indexOf(A[e].site)>=0)return A[e].config},L=()=>{if(!v)return;const t=v.style;t.width="100%",t.height="1000px",t.position="fixed",t.left="50%",t.transform="translate(-50%, 0)"},z=()=>{if(!E)return;const t=E.style;t.minHeight="250px",t.marginTop=y.adNodeMarginTop+"px",t.marginBottom=y.adNodeMarginBottom+"px",t.position="static",t.display="block",window.parent&&y.zIndex&&y.zIndex()},C=t=>{const e=window.parent.scrollY,o=v.style,i=document.getElementById("siteContent")?document.getElementById("siteContent").style:{};e>=0&&e<=g?(o.transform=`translate(-50%, ${-e}px)`,i.transform="translateY(0)"):e>g&&e<=I?(o.transform=`translate(-50%, ${-g}px)`,i.transform=`translateY(${g-e}px)`):e>I&&(o.transform=`translate(-50%, ${-g}px)`,i.transform="translateY(-250px)")},E=H(),y=D(),g=-y.responsiveScroll+b,I=g+250;T()};function w({adFormat:b="",stickyOffset:v=0}={}){b==="fireplace"&&m(v)}return w});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powered-ad-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Configure Ads to load smoothly and at the right position on All Nine's websites",
|
|
5
5
|
"main": "dist/powered-ad-config.umd.js",
|
|
6
6
|
"module": "dist/powered-ad-config.es.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"preview": "vite preview"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"vite": "^5.4.
|
|
17
|
+
"vite": "^5.4.7"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
},
|