From d6025140fd76549008a3a2a4236feaee279440cf Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+StroepWafel@users.noreply.github.com> Date: Fri, 28 Nov 2025 14:03:17 +1030 Subject: [PATCH 1/3] add privacy statement popup --- src/interface/pages/settings.svelte | 49 ++++++++++------ src/plugins/monofile.ts | 88 ++++++++++++++++++++++++++++- src/types/storage.ts | 1 + 3 files changed, 120 insertions(+), 18 deletions(-) diff --git a/src/interface/pages/settings.svelte b/src/interface/pages/settings.svelte index 5be5f0d2..bc1222db 100644 --- a/src/interface/pages/settings.svelte +++ b/src/interface/pages/settings.svelte @@ -55,6 +55,11 @@ closeExtensionPopup(); }; + const openPrivacyStatement = () => { + window.open("https://betterseqta.org/privacy", "_blank"); + closeExtensionPopup(); + }; + let { standalone } = $props<{ standalone?: boolean }>(); let showColourPicker = $state(false); @@ -101,25 +106,34 @@ /> {#if !standalone} - +
+ - + - + + +
{/if} diff --git a/src/plugins/monofile.ts b/src/plugins/monofile.ts index 4a692dad..20106a7b 100644 --- a/src/plugins/monofile.ts +++ b/src/plugins/monofile.ts @@ -96,7 +96,13 @@ export async function finishLoad() { console.error("Error during loading cleanup:", err); } - if (settingsState.justupdated && !document.getElementById("whatsnewbk")) { + // Show privacy statement notification on first open of this version (before what's new) + if (!settingsState.privacyStatementShown && !document.getElementById("privacy-notification")) { + showPrivacyNotification(); + settingsState.privacyStatementShown = true; + } + + if (settingsState.justupdated && !document.getElementById("whatsnewbk") && !document.getElementById("privacy-notification")) { OpenWhatsNewPopup(); } } @@ -601,6 +607,86 @@ export function showConflictPopup() { }); } +export function showPrivacyNotification() { + if (document.getElementById("privacy-notification")) return; + + const background = document.createElement("div"); + background.id = "privacy-notification"; + background.classList.add("whatsnewBackground"); + background.style.zIndex = "10000001"; + + const container = document.createElement("div"); + container.classList.add("whatsnewContainer"); + container.style.height = "auto"; + container.style.maxWidth = "800px"; + container.style.width = "90%"; + + const headerHTML = /* html */ ` +
+

Privacy Statement

+

Important Information

+
+ `; + const header = stringToHTML(headerHTML).firstChild; + + const textHTML = /* html */ ` +
+

+ It has come to our attention that several schools have expressed concerns about BetterSEQTA+. As security is at the core of everything we do, this is an issue we take very seriously, which is why we have decided to release a statement on the situation. +

+

+ To view our privacy policy, please click the shield icon in the settings menu, or click here. +

+

+ We never collect any information from you, and aim to provide the best features possible. +

+
+ `; + const text = stringToHTML(textHTML).firstChild; + + const exitButton = document.createElement("div"); + exitButton.id = "whatsnewclosebutton"; + + if (header) container.append(header); + if (text) container.append(text); + container.append(exitButton); + + background.append(container); + + document.getElementById("container")?.append(background); + + if (settingsState.animations) { + animate([background as HTMLElement], { opacity: [0, 1] }); + } + + background.addEventListener("click", (event) => { + if (event.target === background) { + background.remove(); + // Show what's new if it was waiting + if (settingsState.justupdated && !document.getElementById("whatsnewbk")) { + OpenWhatsNewPopup(); + } + } + }); + + exitButton.addEventListener("click", () => { + background.remove(); + // Show what's new if it was waiting + if (settingsState.justupdated && !document.getElementById("whatsnewbk")) { + OpenWhatsNewPopup(); + } + }); + + // Handle privacy link click - ensure it opens in new tab + const privacyLink = document.getElementById("privacy-link"); + if (privacyLink) { + privacyLink.addEventListener("click", (e) => { + e.preventDefault(); + window.open("https://betterseqta.org/privacy", "_blank", "noopener,noreferrer"); + }); + } +} + export function init() { const handleDisabled = () => { waitForElm(".code", true, 50).then(AppendElementsToDisabledPage); diff --git a/src/types/storage.ts b/src/types/storage.ts index a085567d..5b6e7c1d 100644 --- a/src/types/storage.ts +++ b/src/types/storage.ts @@ -30,6 +30,7 @@ export interface SettingsState { subjectfilters: Record; transparencyEffects: boolean; justupdated?: boolean; + privacyStatementShown?: boolean; timeFormat?: string; animations: boolean; defaultPage: string; From a67f4d2e258f0c4cdd7f4ae60c0bada262d462cf Mon Sep 17 00:00:00 2001 From: Alphons Joseph <93847055+Crazypersonalph@users.noreply.github.com> Date: Fri, 28 Nov 2025 22:22:11 +0800 Subject: [PATCH 2/3] Update monofile.ts --- src/plugins/monofile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/monofile.ts b/src/plugins/monofile.ts index 20106a7b..eaac95ad 100644 --- a/src/plugins/monofile.ts +++ b/src/plugins/monofile.ts @@ -632,13 +632,13 @@ export function showPrivacyNotification() { const textHTML = /* html */ `

- It has come to our attention that several schools have expressed concerns about BetterSEQTA+. As security is at the core of everything we do, this is an issue we take very seriously, which is why we have decided to release a statement on the situation. + Several schools have expressed concerns about BetterSEQTA+. Security is at the core of what we do, and we would like to clarify any misinformation. As a Free, Libre, and Open Source software application, we ask you to thoroughly read our privacy policy and vet our code. We specifically want you to hold us accountable.

To view our privacy policy, please click the shield icon in the settings menu, or click here.

- We never collect any information from you, and aim to provide the best features possible. + We have never, are not, and will never collect any information about any user. That is a guarantee.

`; From e67f3110e0cb07ecb74070eac407e585e6d9bd3f Mon Sep 17 00:00:00 2001 From: Alphons Joseph <93847055+Crazypersonalph@users.noreply.github.com> Date: Fri, 28 Nov 2025 22:24:37 +0800 Subject: [PATCH 3/3] Update monofile.ts --- src/plugins/monofile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/monofile.ts b/src/plugins/monofile.ts index eaac95ad..b595e869 100644 --- a/src/plugins/monofile.ts +++ b/src/plugins/monofile.ts @@ -638,7 +638,7 @@ export function showPrivacyNotification() { To view our privacy policy, please click the shield icon in the settings menu, or click here.

- We have never, are not, and will never collect any information about any user. That is a guarantee. + We have never collected, are not collecting, and will never collect any personal information about any user. That is a guarantee.

`;