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:
@@ -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">
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user