ultimate-jekyll-manager 0.0.241 → 0.0.243

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.
@@ -117,9 +117,27 @@ const setupMessageHandler = () => {
117
117
  // Update iframe dimensions dynamically
118
118
  const $iframe = document.getElementById(payload.id);
119
119
  if ($iframe) {
120
+ // If promo-server reports 0 dimensions, it means the iframe hasn't been laid out yet
121
+ // (e.g., ad blocker cosmetic filters or element not in layout flow on initial load).
122
+ // Skip setting height to 0 and request a re-measurement after a delay.
123
+ if (!payload.height || !payload.width) {
124
+ // Track re-measure attempts per iframe
125
+ const reMeasureCount = ($iframe.__reMeasureCount || 0) + 1;
126
+ $iframe.__reMeasureCount = reMeasureCount;
127
+
128
+ // Give up after 5 attempts (total ~8s of retrying including promo-server's own retries)
129
+ if (reMeasureCount > 5) {
130
+ console.warn('[Vert] Giving up on re-measure after', reMeasureCount, 'attempts');
131
+ return;
132
+ }
133
+
134
+ console.warn('[Vert] Received 0 dimensions, requesting re-measure (attempt', reMeasureCount + '):', payload);
135
+ setTimeout(() => {
136
+ $iframe.contentWindow?.postMessage({ command: 'uj-vert-unit:re-measure' }, '*');
137
+ }, 500 * reMeasureCount);
138
+ return;
139
+ }
120
140
  $iframe.style.height = payload.height + 'px';
121
- // DISABLED: See revealVertUnit note above
122
- // revealVertUnit($iframe.closest('vert-unit'));
123
141
  }
124
142
  } else if (command === 'uj-vert-unit:click') {
125
143
  // Navigate to the URL when ad is clicked
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "0.0.241",
3
+ "version": "0.0.243",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -1,16 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Read(//Users/ian/Library/Application Support/Code/User/**)",
5
- "Read(//Users/ian/Developer/Repositories/ITW-Creative-works/ultimate-jekyll-manager/src/gulp/tasks/**)",
6
- "Read(//Users/ian/Developer/Repositories/ITW-Creative-works/ultimate-jekyll-manager/src/**)",
7
- "Read(//Users/ian/Developer/Repositories/Trusteroo/trusteroo-website/**)",
8
- "Bash(cat:*)",
9
- "Read(//Users/ian/Developer/Repositories/ITW-Creative-Works/ultimate-jekyll-legacy/special/master/pages/admin/notifications/**)",
10
- "mcp__mcp-router__chrome-devtools__navigate_page",
11
- "mcp__mcp-router__chrome-devtools__resize_page"
12
- ],
13
- "deny": [],
14
- "ask": []
15
- }
16
- }