update at 2026-03-04 13:25:26

This commit is contained in:
douboer@gmail.com
2026-03-04 13:25:26 +08:00
parent 7d2be3d67d
commit 5fbfdc651f
44 changed files with 84 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
const fs = require('fs');
let code = fs.readFileSync('src/components/TerminalPanel.vue', 'utf8');
// remove multiline logs
code = code.replace(/console\.log\(\s*\[Scroll Deep\][ \w\W]*?\);/g, '');
// remove redundant empty else blocks
code = code.replace(/\s*\} else \{\s*\}/g, '');
// remove duplicated momentum logic
code = code.replace(/(\s*\/\/ 释放时触发滚行动量\s*if \(Math\.abs\(touchScrollVelocity\) > 0\.2 && touchGateScrollLike && !hasActiveNativeSelectionInTerminal\(\)\) \{\s*touchScrollVelocity \*= 1\.35;\s*runTouchScrollMomentum\(\);\s*\})\s*\/\/ 释放时触发滚行动量\s*if \(Math\.abs\(touchScrollVelocity\) > 0\.2 && touchGateScrollLike && !hasActiveNativeSelectionInTerminal\(\)\) \{\s*touchScrollVelocity \*= 1\.35;\s*runTouchScrollMomentum\(\);\s*\}/g, '$1');
fs.writeFileSync('src/components/TerminalPanel.vue', code);