← back to Dw Marketing Viewer
Stage dead-script removal (zd-loader.js, sku-redact.js) in WPB remote-edit — idempotent, no push
eef0c27d2b81203e98d2e7396aeb3d47cbbf3572 · 2026-06-23 13:59:55 -0700 · Steve
Files touched
M site-deploy/_remote-edit.py
Diff
commit eef0c27d2b81203e98d2e7396aeb3d47cbbf3572
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jun 23 13:59:55 2026 -0700
Stage dead-script removal (zd-loader.js, sku-redact.js) in WPB remote-edit — idempotent, no push
---
site-deploy/_remote-edit.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/site-deploy/_remote-edit.py b/site-deploy/_remote-edit.py
index b5dfee3..8ebbb85 100644
--- a/site-deploy/_remote-edit.py
+++ b/site-deploy/_remote-edit.py
@@ -65,6 +65,19 @@ if '.cinema-wm{' not in s and css_anchor in s:
s = s.replace(css_anchor, css_anchor + '\n' + cwm_css, 1)
notes.append("cinema overlay CSS")
+# ---- C: remove dead 404 <script> tags (zd-loader.js, sku-redact.js) ----
+# Both 404 on the live host and throw console errors. Idempotent: skip if gone.
+dead_scripts = [
+ '<script src="/zd-loader.js" defer></script>\n',
+ '<script src="/sku-redact.js" defer></script>\n',
+]
+for tag in dead_scripts:
+ if tag in s:
+ s = s.replace(tag, '', 1)
+ notes.append("removed dead script " + tag.split('"')[1])
+ else:
+ notes.append("dead script " + tag.split('"')[1] + " already absent")
+
# ---- write index.html once, with a single backup ----
if s != s0:
open(idx + ".bak-rebrand-%d" % ts, "w").write(s0)
← 5c6864c auto-save: 2026-06-23T13:52:03 (1 files) — site-deploy/LIVE-
·
back to Dw Marketing Viewer
·
auto-save: 2026-06-23T15:52:50 (1 files) — site-deploy/_remo f4e8fa7 →