Remove redundant fallback for adding known safe sites

Deleted the addKnownSafeSites() function since safe sites are already reliably loaded from local storage or fetched dynamically via fetchSafeSites().
This commit is contained in:
RePacked 2025-05-01 03:54:12 +02:00 committed by GitHub
parent b0caeed041
commit 726ff73530
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -794,49 +794,6 @@ async function initializeSettings() {
console.log("Settings initialized:", mergedSettings);
}
// Add well-known safe sites manually as a fallback
function addKnownSafeSites() {
// Known safe sites from FMHY that should be recognized
const knownSafeSites = [
// Common gaming sites
"https://fitgirl-repacks.site",
"https://pcgamestorrents.com",
"https://steamunlocked.net",
"https://gog-games.com",
// Common tools/software sites
// GitHub URLs should be evaluated per repository, not by domain
"https://gitlab.com",
"https://sourceforge.net",
// Media streaming/download sites
"https://archive.org",
"https://nyaa.si",
"https://rutracker.org",
"https://1337x.to",
// Known safe GitHub repositories
"https://github.com/hydralauncher/hydra",
// Add more known safe sites here as needed
];
// Process and add to safeSites
const normalizedSites = knownSafeSites
.map((site) => normalizeUrl(site))
.filter((site) => site);
// Add to safeSites if not already present
for (const site of normalizedSites) {
if (!safeSites.includes(site)) {
console.log(`Adding known safe site: ${site}`);
safeSites.push(site);
}
}
console.log(`Added ${normalizedSites.length} known safe sites as fallback`);
}
// Extension initialization
async function initializeExtension() {
console.log("Initializing extension...");