From d67897aa177581caa4dbd086fb07bff794dbea14 Mon Sep 17 00:00:00 2001 From: Ben Miller Date: Sun, 28 Dec 2025 20:35:29 -0700 Subject: [PATCH] Fix Media Manager critical syntax errors and enforce ES5 architecture - Resolved persistent 'SyntaxError: Unexpected token class' by refactoring 'MediaState' and 'UI' classes in MediaManager.html to standard ES5 function constructors. - Resolved 'SyntaxError: Unexpected identifier src' by rewriting 'createCard' to use 'document.createElement' instead of template strings for dynamic media elements. - Consolidated script tags in MediaManager.html to prevent Apps Script parser merge issues. - Updated docs/ARCHITECTURE.md and MEMORY.md to formally document client-side constraints (No ES6 classes, strict DOM manipulation for media). - Note: Google Drive video animate-on-hover functionality is implemented but currently pending verification/fix. --- MEMORY.md | 8 +- docs/ARCHITECTURE.md | 16 + src/MediaManager.html | 1043 ++++++++++++++------------- src/mediaHandlers.ts | 8 +- src/services/MediaService.ts | 18 +- src/services/ShopifyMediaService.ts | 11 + 6 files changed, 617 insertions(+), 487 deletions(-) diff --git a/MEMORY.md b/MEMORY.md index 3e78551..cd80ec0 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -40,5 +40,9 @@ This project (`product_inventory`) integrates Google Sheets with Shopify. It ser 1. Sanitize with `Utilities.newBlob()`. 2. Fallback to **Advanced Drive Service** (`Drive.Files.create` / `v3`) if standard creation fails. - **Video Previews**: - - HTML5 `