This repository has been archived on 2026-06-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
master-ai/vibn-frontend/docs/scripts/patch_window.js

16 lines
526 B
JavaScript

const fs = require('fs');
const file = 'app/(onboarding)/onboarding/page.tsx';
let code = fs.readFileSync(file, 'utf8');
code = code.replace(
'const close = () => { window.location.href = "index.html"; };',
'const close = () => { if (typeof window !== "undefined") window.location.href = "/"; };'
);
code = code.replace(
'const openChat = () => { window.location.href = "index.html"; };',
'const openChat = () => { if (typeof window !== "undefined") window.location.href = "/"; };'
);
fs.writeFileSync(file, code);