const fs = require('fs'); let html = fs.readFileSync('extension/popup.html', 'utf8'); // Tooltips for inputs html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); // Tooltips for buttons html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); // Tooltips for tabs html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); html = html.replace('', ''); // Remove explicit ℹ️ where not needed since it's hidden now html = html.replace('>Hide Clutter Tabs ℹ️<', ' title="Filters out non-video tabs and unrelated domains to keep the list clean">Hide Clutter Tabs<'); html = html.replace('>Auto-Sync Next Episode ℹ️<', ' title="Automatically clicks \'Next Episode\' on supported sites like Netflix when others do">Auto-Sync Next Episode<'); html = html.replace('>Auto-copy invite on Create ℹ️<', ' title="Automatically copies the invite link to your clipboard when you create a new room">Auto-copy invite on Create<'); html = html.replace('>Browser Notifications ℹ️<', ' title="Shows native system notifications when someone joins/leaves or plays/pauses.">Browser Notifications<'); // Fix onboarding layout html = html.replace('align-items:center; justify-content:center;">', 'align-items:flex-end; justify-content:center; padding-bottom: 20px;">'); html = html.replace('margin-top: 50px;', ''); fs.writeFileSync('extension/popup.html', html, 'utf8'); let js = fs.readFileSync('extension/popup.js', 'utf8'); const newAvatarFn = `function getAvatarForName(username) { if (!username) return '👤'; const lower = username.toLowerCase(); const map = { 'koala': '🐨', 'panda': '🐼', 'tiger': '🐯', 'eagle': '🦅', 'fox': '🦊', 'bear': '🐻', 'wolf': '🐺', 'lion': '🦁', 'hawk': '🦅', 'seal': '🦭', 'owl': '🦉', 'shark': '🦈', 'dragon': '🐉', 'phoenix': '🐦', 'falcon': '🦅', 'panther': '🐆', 'raven': '🐦‍⬛', 'cobra': '🐍', 'lynx': '🐈', 'jaguar': '🐆', 'orca': '🐋', 'mantis': '🦗', 'viper': '🐍', 'condor': '🦅', 'badger': '🦡', 'otter': '🦦', 'rhino': '🦏', 'crane': '🦩', 'mongoose': '🦦', 'specter': '👻' }; for (const [key, emoji] of Object.entries(map)) { if (lower.includes(key)) return emoji; } return '👤'; }`; js = js.replace(/function getAvatarForName\(username\) \{[\s\S]*?return '👤';\n\}/, newAvatarFn); fs.writeFileSync('extension/popup.js', js, 'utf8'); console.log("Fixed UI");