39647-vm/js/replit-webflow-compat.js
tornikegerantia bc95274472 Add compatibility for Replit environment and local development
Update backend server to handle Webflow GraphQL endpoints and CSRF tokens, serve static files correctly, and use 0.0.0.0 host. Add a compatibility script for frontend Webflow e-commerce issues and update HTML files to include it.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 375ec6d3-d5af-4f82-ab81-5c60fd4a86a3
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 05dda85a-ad24-46c8-b27e-50c860b4dd57
Replit-Helium-Checkpoint-Created: true
2026-04-14 21:14:11 +00:00

13 lines
414 B
JavaScript

(() => {
const ignoredMessages = [
'Did not receive CSRF token',
"Cannot read properties of undefined (reading 'f_sku_values_3dr')",
];
window.addEventListener('unhandledrejection', event => {
const message = event.reason && (event.reason.message || String(event.reason));
if (ignoredMessages.some(text => message && message.includes(text))) {
event.preventDefault();
}
});
})();