powered-ad-config 0.0.17 → 0.0.18
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,31 +1,39 @@
|
|
|
1
1
|
const z = (h) => {
|
|
2
|
-
const w = window.frameElement ? window.frameElement : null,
|
|
2
|
+
const w = window.frameElement ? window.frameElement : null, a = {
|
|
3
3
|
siteBackgroundColor: "#ffffff",
|
|
4
4
|
fireplaceLeftMargin: 0,
|
|
5
5
|
adNodeMarginTop: -24,
|
|
6
6
|
adNodeMarginBottom: 24,
|
|
7
7
|
responsiveScroll: -124,
|
|
8
|
-
xPosHalfpage:
|
|
9
|
-
|
|
8
|
+
xPosHalfpage: function() {
|
|
9
|
+
return 695;
|
|
10
|
+
},
|
|
11
|
+
yPosHalfpage: function() {
|
|
12
|
+
return 72;
|
|
13
|
+
},
|
|
10
14
|
stickyMargin: { offset: 72, isSticky: !0 },
|
|
11
15
|
zIndex: function() {
|
|
12
|
-
var o, i, r, s,
|
|
13
|
-
const t = window.parent.document, e = (
|
|
14
|
-
(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);"), (
|
|
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");
|
|
15
19
|
}
|
|
16
|
-
},
|
|
20
|
+
}, p = {
|
|
17
21
|
siteBackgroundColor: "#ffffff",
|
|
18
22
|
fireplaceLeftMargin: 0,
|
|
19
23
|
adNodeMarginTop: -24,
|
|
20
24
|
adNodeMarginBottom: 0,
|
|
21
25
|
responsiveScroll: -124,
|
|
22
|
-
xPosHalfpage:
|
|
23
|
-
|
|
26
|
+
xPosHalfpage: function() {
|
|
27
|
+
return 695;
|
|
28
|
+
},
|
|
29
|
+
yPosHalfpage: function() {
|
|
30
|
+
return 32;
|
|
31
|
+
},
|
|
24
32
|
stickyMargin: { offset: 32, isSticky: !0 },
|
|
25
33
|
zIndex: function() {
|
|
26
|
-
var o, i, r, s,
|
|
27
|
-
const t = window.parent.document, e = (v,
|
|
28
|
-
(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);"), (
|
|
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");
|
|
29
37
|
}
|
|
30
38
|
}, m = {
|
|
31
39
|
siteBackgroundColor: "#ffffff",
|
|
@@ -37,15 +45,15 @@ const z = (h) => {
|
|
|
37
45
|
yPosHalfpage: 32,
|
|
38
46
|
stickyMargin: { offset: 8, isSticky: !0 },
|
|
39
47
|
zIndex: function() {
|
|
40
|
-
var o, i, r, s,
|
|
48
|
+
var o, i, n, r, s, l;
|
|
41
49
|
const t = window.parent.document;
|
|
42
|
-
if ((o = t.querySelector('section[data-section="marketing-banner"]')) == null || o.setAttribute("style", "position:relative"), (
|
|
43
|
-
let
|
|
44
|
-
|
|
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
|
+
let c = t.createElement("style");
|
|
52
|
+
c.innerHTML = `
|
|
45
53
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
46
54
|
position: static;
|
|
47
55
|
}
|
|
48
|
-
`, t.head.appendChild(
|
|
56
|
+
`, t.head.appendChild(c);
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
}, S = {
|
|
@@ -58,17 +66,17 @@ const z = (h) => {
|
|
|
58
66
|
yPosHalfpage: 32,
|
|
59
67
|
stickyMargin: { offset: 104, isSticky: !0 },
|
|
60
68
|
zIndex: function() {
|
|
61
|
-
const t = window.parent.document,
|
|
69
|
+
const t = window.parent.document, o = t.querySelector("footer").previousElementSibling;
|
|
62
70
|
if (o && o.tagName.toLowerCase() === "div" && (o.style.position = "relative"), t.querySelector('div[id*="tablet"][id*="takeover"]')) {
|
|
63
|
-
let
|
|
64
|
-
|
|
71
|
+
let n = t.createElement("style");
|
|
72
|
+
n.innerHTML = `
|
|
65
73
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
66
74
|
position: static;
|
|
67
75
|
}
|
|
68
|
-
`, t.head.appendChild(
|
|
76
|
+
`, t.head.appendChild(n);
|
|
69
77
|
}
|
|
70
78
|
}
|
|
71
|
-
},
|
|
79
|
+
}, C = {
|
|
72
80
|
siteBackgroundColor: "#f7f7f7",
|
|
73
81
|
fireplaceLeftMargin: 0,
|
|
74
82
|
adNodeMarginTop: -25,
|
|
@@ -78,11 +86,11 @@ const z = (h) => {
|
|
|
78
86
|
yPosHalfpage: 32,
|
|
79
87
|
stickyMargin: { offset: 104, isSticky: !0 },
|
|
80
88
|
zIndex: function() {
|
|
81
|
-
var o, i, r, s
|
|
82
|
-
const t = window.parent.document, e = (
|
|
83
|
-
(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);"), (
|
|
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");
|
|
84
92
|
}
|
|
85
|
-
},
|
|
93
|
+
}, M = {
|
|
86
94
|
siteBackgroundColor: "#ffffff",
|
|
87
95
|
fireplaceLeftMargin: 0,
|
|
88
96
|
adNodeMarginTop: -32,
|
|
@@ -96,70 +104,65 @@ const z = (h) => {
|
|
|
96
104
|
},
|
|
97
105
|
stickyMargin: { offset: 16, isSticky: !0 },
|
|
98
106
|
zIndex: function() {
|
|
99
|
-
var e, o, i, r, s
|
|
107
|
+
var e, o, i, n, r, s;
|
|
100
108
|
const t = window.parent.document;
|
|
101
|
-
(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"), (
|
|
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);");
|
|
102
110
|
}
|
|
103
|
-
},
|
|
111
|
+
}, b = [
|
|
104
112
|
{ site: "https://www.nine.com.au/sport", config: S },
|
|
105
|
-
{ site: "https://www.nine.com.au/product-reviews", config:
|
|
106
|
-
{ site: "https://www.nine.com.au/property", config:
|
|
107
|
-
{ site: "https://www.nine.com.au/entertainment", config:
|
|
113
|
+
{ site: "https://www.nine.com.au/product-reviews", config: p },
|
|
114
|
+
{ site: "https://www.nine.com.au/property", config: p },
|
|
115
|
+
{ site: "https://www.nine.com.au/entertainment", config: p },
|
|
108
116
|
{ site: "https://staging.nine.com.au/sport", config: S },
|
|
109
|
-
{ site: "https://staging.nine.com.au/product-reviews", config:
|
|
110
|
-
{ site: "https://staging.nine.com.au/property", config:
|
|
111
|
-
{ site: "https://staging.nine.com.au/entertainment", config:
|
|
117
|
+
{ site: "https://staging.nine.com.au/product-reviews", config: p },
|
|
118
|
+
{ site: "https://staging.nine.com.au/property", config: p },
|
|
119
|
+
{ site: "https://staging.nine.com.au/entertainment", config: p },
|
|
112
120
|
{ site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: m },
|
|
113
121
|
{ site: "https://render-web-nine-production-v1.ffxblue.com.au", config: m },
|
|
114
122
|
{ site: "https://preview.nine.com.au/", config: m },
|
|
115
123
|
{ site: "https://www.nine", config: m },
|
|
116
124
|
{ site: "https://staging.nine", config: m },
|
|
117
|
-
{ site: "https://entertainment", config:
|
|
118
|
-
{ site: "https://celebrity", config:
|
|
119
|
-
{ site: "https://homes", config:
|
|
120
|
-
{ site: "https://travel", config:
|
|
121
|
-
{ site: "https://honey", config:
|
|
122
|
-
{ site: "https://style", config:
|
|
123
|
-
{ site: "https://coach", config:
|
|
124
|
-
{ site: "https://kitchen", config:
|
|
125
|
-
{ site: "https://finance", config:
|
|
126
|
-
{ site: "https://wwos", config:
|
|
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 },
|
|
127
135
|
{ site: "https://staging.wwos", config: S },
|
|
128
|
-
{ site: "https://www.9news", config:
|
|
129
|
-
{ site: "https://staging.9news", config:
|
|
130
|
-
{ site: "https://www.yourtv", config:
|
|
131
|
-
{ site: "https://staging.yourtv", config:
|
|
132
|
-
{ site: "https://9now", config:
|
|
133
|
-
{ site: "https://creative-preview-an.com", config:
|
|
134
|
-
],
|
|
135
|
-
const t = document.
|
|
136
|
-
t && (t.style.backgroundColor =
|
|
137
|
-
},
|
|
136
|
+
{ site: "https://www.9news", config: M },
|
|
137
|
+
{ site: "https://staging.9news", config: M },
|
|
138
|
+
{ site: "https://www.yourtv", config: a },
|
|
139
|
+
{ site: "https://staging.yourtv", config: a },
|
|
140
|
+
{ site: "https://9now", config: p },
|
|
141
|
+
{ site: "https://creative-preview-an.com", config: a }
|
|
142
|
+
], I = () => {
|
|
143
|
+
const t = window.document.getElementById("nineContent");
|
|
144
|
+
t && (t.style.backgroundColor = y.siteBackgroundColor), T(), D(), window.parent.window.addEventListener("scroll", N), setTimeout(N, 50);
|
|
145
|
+
}, P = () => {
|
|
138
146
|
let t = null;
|
|
139
147
|
return window.parent && (t = window.parent.document.querySelector('div[id*="billboard"][id*="above"]')), t;
|
|
140
|
-
},
|
|
141
|
-
var e;
|
|
148
|
+
}, H = () => {
|
|
142
149
|
const t = window.parent.location.href;
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
for (let e = 0; e < b.length; e += 1)
|
|
151
|
+
if (t.indexOf(b[e].site) >= 0)
|
|
152
|
+
return b[e].config;
|
|
153
|
+
}, D = () => {
|
|
145
154
|
if (!w) return;
|
|
146
155
|
const t = w.style;
|
|
147
156
|
t.width = "100%", t.height = "1000px", t.position = "fixed", t.left = "50%", t.transform = "translate(-50%, 0)";
|
|
148
157
|
}, T = () => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (!n) {
|
|
158
|
-
console.error("No matching configuration found for the current site.");
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
const g = -n.responsiveScroll + h, E = g + 250;
|
|
162
|
-
P();
|
|
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();
|
|
163
166
|
};
|
|
164
167
|
function _({ adFormat: h = "", stickyOffset: w = 0 } = {}) {
|
|
165
168
|
h === "fireplace" && z(w);
|
|
@@ -1,9 +1,9 @@
|
|
|
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,
|
|
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(
|
|
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)}}},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,s
|
|
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,24 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powered-ad-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
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",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
7
|
"files": [
|
|
9
8
|
"dist"
|
|
10
9
|
],
|
|
11
10
|
"type": "module",
|
|
12
11
|
"scripts": {
|
|
13
12
|
"dev": "vite",
|
|
14
|
-
"build": "
|
|
15
|
-
"preview": "vite preview"
|
|
16
|
-
"prepublishOnly": "npm run build"
|
|
13
|
+
"build": "vite build",
|
|
14
|
+
"preview": "vite preview"
|
|
17
15
|
},
|
|
18
16
|
"devDependencies": {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
"vite": "^5.4.7"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
22
20
|
},
|
|
23
21
|
"author": "Joffrey Lyon",
|
|
24
22
|
"license": "MIT"
|
package/dist/index.d.ts
DELETED