feat: updated privacy statement

This commit is contained in:
SethBurkart123
2025-12-19 14:29:11 +11:00
parent fd5802f9a3
commit d0a11da15f
5 changed files with 56 additions and 214 deletions
-32
View File
@@ -2,34 +2,6 @@ import browser from "webextension-polyfill";
import type { SettingsState } from "@/types/storage";
import { fetchNews } from "./background/news";
interface PrivacyPolicyResponse {
last_updated: string;
whatsnew_html: string;
}
async function fetchPrivacyPolicy(sendResponse: (response?: any) => void) {
try {
const response = await fetch("https://betterseqta.org/api/policy/privacy", {
method: "GET",
headers: {
"Accept": "application/json",
},
});
if (!response.ok) {
console.error("[BetterSEQTA+] Failed to fetch privacy policy:", response.status);
sendResponse({ error: `HTTP ${response.status}`, data: null });
return;
}
const data = await response.json() as PrivacyPolicyResponse;
sendResponse({ error: null, data });
} catch (error) {
console.error("[BetterSEQTA+] Error fetching privacy policy:", error);
sendResponse({ error: String(error), data: null });
}
}
function reloadSeqtaPages() {
const result = browser.tabs.query({});
function open(tabs: any) {
@@ -84,10 +56,6 @@ browser.runtime.onMessage.addListener(
fetchNews(request.source ?? "australia", sendResponse);
return true;
case "fetchPrivacyPolicy":
fetchPrivacyPolicy(sendResponse);
return true;
default:
console.log("Unknown request type");
}