Spaces:
Running
Running
File size: 831 Bytes
d1f8f63 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | const fs = require('fs');
let code = fs.readFileSync('src/views/chat/chat-view.js', 'utf8');
code = code.replace(
/this\.transitionToLoading\(\);/g,
`console.log('triggering transitionToLoading'); this.transitionToLoading();`
);
code = code.replace(
/transitionToLoading\(\) \{/g,
`transitionToLoading() {
console.log('transitionToLoading called. canvas height:', document.getElementById('particle-logo-canvas')?.height);`
);
code = code.replace(
/canvas\.width = viewRect\.width \* dpr;/g,
`console.log('Resizing canvas to', viewRect.width, viewRect.height); canvas.width = viewRect.width * dpr;`
);
code = code.replace(
/this\.cleanupParticleLogo\(true\);/g,
`console.log('cleanupParticleLogo called with true'); this.cleanupParticleLogo(true);`
);
fs.writeFileSync('src/views/chat/chat-view.js', code);
|