mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-30 12:29:27 +00:00
fix: apply boundary-safe hostname matching to remaining platform and blacklist checks
This commit is contained in:
@@ -456,15 +456,15 @@
|
|||||||
|
|
||||||
const platform = (() => {
|
const platform = (() => {
|
||||||
const h = window.location.hostname.toLowerCase();
|
const h = window.location.hostname.toLowerCase();
|
||||||
if (h.includes('youtube.com')) return 'YouTube';
|
if (h === 'youtube.com' || h.endsWith('.youtube.com')) return 'YouTube';
|
||||||
if (h.includes('twitch.tv')) return 'Twitch';
|
if (h === 'twitch.tv' || h.endsWith('.twitch.tv')) return 'Twitch';
|
||||||
if (h.includes('netflix.com')) return 'Netflix';
|
if (h === 'netflix.com' || h.endsWith('.netflix.com')) return 'Netflix';
|
||||||
if (h.includes('primevideo.com') || h.includes('amazon.')) return 'Prime Video';
|
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.includes('disneyplus.com')) return 'Disney+';
|
if (h === 'disneyplus.com' || h.endsWith('.disneyplus.com')) return 'Disney+';
|
||||||
if (h.includes('hulu.com')) return 'Hulu';
|
if (h === 'hulu.com' || h.endsWith('.hulu.com')) return 'Hulu';
|
||||||
if (h.includes('max.com') || h.includes('hbomax.com')) return 'Max/HBO';
|
if (h === 'hbomax.com' || h.endsWith('.hbomax.com') || h === 'max.com' || h.endsWith('.max.com')) return 'Max/HBO';
|
||||||
if (h.includes('vimeo.com')) return 'Vimeo';
|
if (h === 'vimeo.com' || h.endsWith('.vimeo.com')) return 'Vimeo';
|
||||||
if (h.includes('dailymotion.com')) return 'Dailymotion';
|
if (h === 'dailymotion.com' || h.endsWith('.dailymotion.com')) return 'Dailymotion';
|
||||||
return 'Generic';
|
return 'Generic';
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -813,7 +813,7 @@ function updateRoomList(rooms) {
|
|||||||
function checkInviteLink() {
|
function checkInviteLink() {
|
||||||
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
|
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
|
||||||
const tab = tabs[0];
|
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 {
|
try {
|
||||||
const rawHash = tab.url.split('#join:')[1];
|
const rawHash = tab.url.split('#join:')[1];
|
||||||
if (!rawHash) return;
|
if (!rawHash) return;
|
||||||
|
|||||||
+1
-2
@@ -67,7 +67,6 @@ export const BLACKLIST_DOMAINS = [
|
|||||||
|
|
||||||
// Productivity & Project Management
|
// Productivity & Project Management
|
||||||
'atlassian.net',
|
'atlassian.net',
|
||||||
'jira',
|
|
||||||
'trello.com',
|
'trello.com',
|
||||||
'notion.so',
|
'notion.so',
|
||||||
'monday.com',
|
'monday.com',
|
||||||
@@ -168,7 +167,7 @@ export const BLACKLIST_DOMAINS = [
|
|||||||
// Games & Idle Sites
|
// Games & Idle Sites
|
||||||
'milkywayidle.com',
|
'milkywayidle.com',
|
||||||
'melvoridle.com',
|
'melvoridle.com',
|
||||||
'cookieclicker.',
|
'cookieclicker.com',
|
||||||
'clickerheroes.com',
|
'clickerheroes.com',
|
||||||
'kongregate.com',
|
'kongregate.com',
|
||||||
'armorgames.com',
|
'armorgames.com',
|
||||||
|
|||||||
Reference in New Issue
Block a user