Remove @b1rdmania from OG share copy, strip mid/midi from song titles

- OG description no longer includes "by @b1rdmania" (only X share has it)
- Song titles now strip standalone "mid" and "midi" words

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
b1rdmania
2025-12-29 14:53:28 +00:00
parent 2df84d9679
commit e485335a26
3 changed files with 10 additions and 2 deletions
+2 -2
View File
@@ -222,8 +222,8 @@ app.get('/s/:code', async (req, res) => {
const sharedTitle = (payload.title || '').trim();
const ogTitle = sharedTitle ? `${sharedTitle} - WARIO SYNTH` : 'WARIO SYNTH';
const ogDescription = sharedTitle
? `I made ${sharedTitle} game boy version. Click to listen or generate your own, made in Wario Synth by @b1rdmania.`
: 'Turn any song into retro game console music. Made by @b1rdmania.';
? `I made ${sharedTitle} game boy version. Click to listen or generate your own.`
: 'Turn any song into retro game console music.';
const html = `<!doctype html>
<html lang="en">
+4
View File
@@ -644,6 +644,10 @@ class MotifApp {
.replace(/[_]+/g, ' ')
.replace(/[.]+/g, ' ')
.replace(/\s+/g, ' ')
.trim()
// Strip standalone "mid" or "midi" words (case insensitive)
.replace(/\b(midi?)\b/gi, '')
.replace(/\s+/g, ' ')
.trim();
return this.titleCase(cleaned || 'Unknown');
}
+4
View File
@@ -53,6 +53,10 @@ function cleanLooseTitle(raw: string): string {
.replace(/[_]+/g, ' ')
.replace(/[.]+/g, ' ')
.replace(/\s+/g, ' ')
.trim()
// Strip standalone "mid" or "midi" words
.replace(/\b(midi?)\b/gi, '')
.replace(/\s+/g, ' ')
.trim();
}