ultimate-jekyll-manager 0.0.238 → 0.0.239
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/assets/js/modules/vert.js +20 -14
- package/package.json +1 -1
|
@@ -11,13 +11,17 @@ const searchParams = new URLSearchParams(window.location.search);
|
|
|
11
11
|
const qsDebug = searchParams.get('debug') === 'true';
|
|
12
12
|
const qsLoud = searchParams.get('loud') === 'true';
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
// DISABLED: Hide/reveal system for vert units. Was causing in-house verts (promo-server fallback)
|
|
15
|
+
// to not display because: (1) vert-unit starts hidden with max-height:0, (2) AdSense "ghost fills"
|
|
16
|
+
// (reports filled but renders nothing) would reveal an empty container, (3) iframe height was set
|
|
17
|
+
// to 0 and relied on promo-server sending dimensions back, but promo-server was sending height:0.
|
|
18
|
+
// Re-enable once promo-server set-dimensions is fixed and ghost fill detection is added.
|
|
19
|
+
// const revealVertUnit = ($vertUnit) => {
|
|
20
|
+
// if ($vertUnit) {
|
|
21
|
+
// $vertUnit.style.removeProperty('overflow');
|
|
22
|
+
// $vertUnit.style.removeProperty('max-height');
|
|
23
|
+
// }
|
|
24
|
+
// };
|
|
21
25
|
|
|
22
26
|
// Protect height-constrained ancestors from AdSense's height: auto !important override.
|
|
23
27
|
// Walks up from the ad's script element and observes any ancestor with a fixed-height class.
|
|
@@ -114,7 +118,8 @@ const setupMessageHandler = () => {
|
|
|
114
118
|
const $iframe = document.getElementById(payload.id);
|
|
115
119
|
if ($iframe) {
|
|
116
120
|
$iframe.style.height = payload.height + 'px';
|
|
117
|
-
revealVertUnit
|
|
121
|
+
// DISABLED: See revealVertUnit note above
|
|
122
|
+
// revealVertUnit($iframe.closest('vert-unit'));
|
|
118
123
|
}
|
|
119
124
|
} else if (command === 'uj-vert-unit:click') {
|
|
120
125
|
// Navigate to the URL when ad is clicked
|
|
@@ -149,7 +154,8 @@ const monitorAdFillStatus = ($vertUnit, config) => {
|
|
|
149
154
|
// Handle filled status
|
|
150
155
|
if (status === 'filled') {
|
|
151
156
|
console.log('[Vert] Adsense is filled, no fallback needed');
|
|
152
|
-
revealVertUnit
|
|
157
|
+
// DISABLED: See revealVertUnit note above
|
|
158
|
+
// revealVertUnit($vertUnit);
|
|
153
159
|
return;
|
|
154
160
|
}
|
|
155
161
|
|
|
@@ -202,7 +208,7 @@ const createCustomAd = ($vertUnit, config) => {
|
|
|
202
208
|
$iframe.style.cssText = config.style;
|
|
203
209
|
$iframe.setAttribute('sandbox', 'allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation');
|
|
204
210
|
$iframe.width = '100%';
|
|
205
|
-
$iframe.height = '0'
|
|
211
|
+
$iframe.height = '100%'; // DISABLED: was '0' to rely on promo-server set-dimensions, but promo-server sends height:0
|
|
206
212
|
$iframe.setAttribute('frameborder', '0');
|
|
207
213
|
$iframe.setAttribute('marginwidth', '0');
|
|
208
214
|
$iframe.setAttribute('marginheight', '0');
|
|
@@ -216,8 +222,8 @@ const createCustomAd = ($vertUnit, config) => {
|
|
|
216
222
|
$vertUnit.innerHTML = '';
|
|
217
223
|
$vertUnit.appendChild($iframe);
|
|
218
224
|
|
|
219
|
-
//
|
|
220
|
-
revealVertUnit($vertUnit);
|
|
225
|
+
// DISABLED: See revealVertUnit note above
|
|
226
|
+
// revealVertUnit($vertUnit);
|
|
221
227
|
|
|
222
228
|
// Retrigger bindings to apply plan visibility
|
|
223
229
|
webManager.auth().listen({ once: true }, async () => {
|
|
@@ -240,8 +246,8 @@ const createAdUnit = (config, $currentScript) => {
|
|
|
240
246
|
$vertUnit.className = 'uj-vert-unit';
|
|
241
247
|
$vertUnit.setAttribute('data-wm-bind', '@hide auth.account.subscription.product !== basic');
|
|
242
248
|
|
|
243
|
-
//
|
|
244
|
-
$vertUnit.style.cssText = 'overflow:hidden; max-height:0;';
|
|
249
|
+
// DISABLED: See revealVertUnit note above
|
|
250
|
+
// $vertUnit.style.cssText = 'overflow:hidden; max-height:0;';
|
|
245
251
|
|
|
246
252
|
// Create the ins element for AdSense
|
|
247
253
|
const $ins = document.createElement('ins');
|