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.
This commit is contained in:
@ -107,7 +107,13 @@ export function getMediaDiagnostics(sku: string) {
|
||||
|
||||
const shopifyId = product.shopify_id || ""
|
||||
|
||||
return mediaService.getDiagnostics(sku, shopifyId)
|
||||
const diagnostics = mediaService.getDiagnostics(sku, shopifyId)
|
||||
|
||||
// Inject OAuth token for frontend video streaming (Drive API alt=media)
|
||||
return {
|
||||
...diagnostics,
|
||||
token: ScriptApp.getOAuthToken()
|
||||
}
|
||||
}
|
||||
|
||||
export function saveFileToDrive(sku: string, filename: string, mimeType: string, base64Data: string) {
|
||||
|
||||
Reference in New Issue
Block a user