diff --git a/extension/content.js b/extension/content.js index af0574f..afae73f 100644 --- a/extension/content.js +++ b/extension/content.js @@ -456,15 +456,15 @@ const platform = (() => { const h = window.location.hostname.toLowerCase(); - if (h.includes('youtube.com')) return 'YouTube'; - if (h.includes('twitch.tv')) return 'Twitch'; - if (h.includes('netflix.com')) return 'Netflix'; - if (h.includes('primevideo.com') || h.includes('amazon.')) return 'Prime Video'; - if (h.includes('disneyplus.com')) return 'Disney+'; - if (h.includes('hulu.com')) return 'Hulu'; - if (h.includes('max.com') || h.includes('hbomax.com')) return 'Max/HBO'; - if (h.includes('vimeo.com')) return 'Vimeo'; - if (h.includes('dailymotion.com')) return 'Dailymotion'; + if (h === 'youtube.com' || h.endsWith('.youtube.com')) return 'YouTube'; + if (h === 'twitch.tv' || h.endsWith('.twitch.tv')) return 'Twitch'; + if (h === 'netflix.com' || h.endsWith('.netflix.com')) return 'Netflix'; + if (h === 'primevideo.com' || h.endsWith('.primevideo.com') || /(^|\.)amazon\.(com|co\.uk|de|fr|it|es|ca|co\.jp|in|com\.au|com\.br|com\.mx|nl|se|pl|sg|ae|sa|tr|cn)$/.test(h)) return 'Prime Video'; + if (h === 'disneyplus.com' || h.endsWith('.disneyplus.com')) return 'Disney+'; + if (h === 'hulu.com' || h.endsWith('.hulu.com')) return 'Hulu'; + if (h === 'hbomax.com' || h.endsWith('.hbomax.com') || h === 'max.com' || h.endsWith('.max.com')) return 'Max/HBO'; + if (h === 'vimeo.com' || h.endsWith('.vimeo.com')) return 'Vimeo'; + if (h === 'dailymotion.com' || h.endsWith('.dailymotion.com')) return 'Dailymotion'; return 'Generic'; })(); diff --git a/extension/popup.js b/extension/popup.js index 7e4e885..ecc5418 100644 --- a/extension/popup.js +++ b/extension/popup.js @@ -813,7 +813,7 @@ function updateRoomList(rooms) { function checkInviteLink() { chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { const tab = tabs[0]; - if (tab && tab.url && tab.url.includes(OFFICIAL_LANDING_PAGE_URL) && tab.url.includes('#join:')) { + if (tab && tab.url && tab.url.startsWith(OFFICIAL_LANDING_PAGE_URL + '/') && tab.url.includes('#join:')) { try { const rawHash = tab.url.split('#join:')[1]; if (!rawHash) return; diff --git a/shared/blacklist.js b/shared/blacklist.js index 799a7aa..b6ec0e6 100644 --- a/shared/blacklist.js +++ b/shared/blacklist.js @@ -67,7 +67,6 @@ export const BLACKLIST_DOMAINS = [ // Productivity & Project Management 'atlassian.net', - 'jira', 'trello.com', 'notion.so', 'monday.com', @@ -168,7 +167,7 @@ export const BLACKLIST_DOMAINS = [ // Games & Idle Sites 'milkywayidle.com', 'melvoridle.com', - 'cookieclicker.', + 'cookieclicker.com', 'clickerheroes.com', 'kongregate.com', 'armorgames.com',