diff --git a/src/core/client.mjs b/src/core/client.mjs index f4307be..5554663 100644 --- a/src/core/client.mjs +++ b/src/core/client.mjs @@ -4,8 +4,10 @@ * (https://notion-enhancer.github.io/) under the MIT license */ +// telemetry endpoint not ready, disabled for current release + import { checkForUpdate } from "./updateCheck.mjs"; -import { sendTelemetryPing } from "./sendTelemetry.mjs"; +// import { sendTelemetryPing } from "./sendTelemetry.mjs"; import { Modal, Frame } from "./islands/Modal.mjs"; import { MenuButton } from "./islands/MenuButton.mjs"; import { Tooltip } from "./islands/Tooltip.mjs"; @@ -152,5 +154,5 @@ export default async (api, db) => insertPanel(api, db), insertCustomStyles(api, db), loadThemeOverrides(api, db), - sendTelemetryPing(), + // sendTelemetryPing(), ]).then(() => api.sendMessage("notion-enhancer", "load-complete")); diff --git a/src/core/menu/islands/Banner.mjs b/src/core/menu/islands/Banner.mjs index e09bcce..dd44106 100644 --- a/src/core/menu/islands/Banner.mjs +++ b/src/core/menu/islands/Banner.mjs @@ -166,14 +166,13 @@ function Banner({ updateAvailable, isDevelopmentBuild }) { >Sponsor me - + <${Description} class="mt-[6px]"> - Sponsors help make open-source development sustainable and receive + `; initDatabase() diff --git a/src/core/menu/islands/Onboarding.mjs b/src/core/menu/islands/Onboarding.mjs index 1c9d118..eb37f60 100644 --- a/src/core/menu/islands/Onboarding.mjs +++ b/src/core/menu/islands/Onboarding.mjs @@ -31,9 +31,7 @@ function Onboarding() { process and/or store data on your device (including workspace content, device metadata, and notion-enhancer configuration) as described in its privacy policy. Unless otherwise stated, the notion-enhancer will never - transmit your information from your device. Collection of anonymous - telemetry data is enabled by default and can be disabled at any time - through the menu. + transmit personally identifiable information from your device.

The notion-enhancer is free and open-source software distributed under the MIT License without warranty of any diff --git a/src/core/menu/islands/Telemetry.mjs b/src/core/menu/islands/Telemetry.mjs index 8aebc1e..7a865d0 100644 --- a/src/core/menu/islands/Telemetry.mjs +++ b/src/core/menu/islands/Telemetry.mjs @@ -4,6 +4,8 @@ * (https://notion-enhancer.github.io/) under the MIT license */ +// telemetry endpoint not ready, disabled for current release + import { collectTelemetryData } from "../../sendTelemetry.mjs"; import { Option } from "./Options.mjs"; diff --git a/src/core/menu/menu.mjs b/src/core/menu/menu.mjs index 1473ba2..4775339 100644 --- a/src/core/menu/menu.mjs +++ b/src/core/menu/menu.mjs @@ -9,7 +9,6 @@ import { Sidebar } from "./islands/Sidebar.mjs"; import { Footer } from "./islands/Footer.mjs"; import { Banner } from "./islands/Banner.mjs"; import { Onboarding } from "./islands/Onboarding.mjs"; -import { Telemetry } from "./islands/Telemetry.mjs"; import { View } from "./islands/View.mjs"; import { List } from "./islands/List.mjs"; import { Mod } from "./islands/Mod.mjs"; @@ -140,17 +139,16 @@ const renderMenu = async () => { <${View} id="core"> <${Options} mod=${mods.find(({ _src }) => _src === "core")} /> - <${Telemetry} /> <${Profiles} /> - - ${[...categories, ...mods] + + ${[...categories, ...mods] .filter(({ view }) => view) .map(({ view }) => view)} <${Footer} categories=${categories} /> - `; + `; useState(["footerOpen"], ([footerOpen]) => { $main.style.height = footerOpen ? "100%" : "calc(100% + 65px)"; }); diff --git a/src/core/sendTelemetry.mjs b/src/core/sendTelemetry.mjs index 1f533ae..96d85b5 100644 --- a/src/core/sendTelemetry.mjs +++ b/src/core/sendTelemetry.mjs @@ -4,6 +4,8 @@ * (https://notion-enhancer.github.io/) under the MIT license */ +// telemetry endpoint not ready, disabled for current release + const pingEndpoint = "https://notion-enhancer.deno.dev/api/ping", collectTelemetryData = async () => { const { platform, version } = globalThis.__enhancerApi, @@ -17,29 +19,29 @@ const pingEndpoint = "https://notion-enhancer.deno.dev/api/ping", return { platform, version, timezone, enabled_mods }; }, sendTelemetryPing = async () => { - const db = __enhancerApi.initDatabase(), - { version } = globalThis.__enhancerApi, - agreedToTerms = await db.get("agreedToTerms"), - telemetryEnabled = (await db.get("telemetryEnabled")) ?? true; - if (!telemetryEnabled || agreedToTerms !== version) return; + // const db = __enhancerApi.initDatabase(), + // { version } = globalThis.__enhancerApi, + // agreedToTerms = await db.get("agreedToTerms"), + // telemetryEnabled = (await db.get("telemetryEnabled")) ?? true; + // if (!telemetryEnabled || agreedToTerms !== version) return; - const lastTelemetryPing = await db.get("lastTelemetryPing"); - if (lastTelemetryPing) { - const msSincePing = Date.now() - new Date(lastTelemetryPing); - // send ping only once a week - if (msSincePing / 8.64e7 < 7) return; - } + // const lastTelemetryPing = await db.get("lastTelemetryPing"); + // if (lastTelemetryPing) { + // const msSincePing = Date.now() - new Date(lastTelemetryPing); + // // send ping only once a week + // if (msSincePing / 8.64e7 < 7) return; + // } - try { - const telemetryData = await collectTelemetryData(), - pingTimestamp = await fetch(pingEndpoint, { - method: "POST", - body: JSON.stringify(telemetryData), - }).then((res) => res.text()); - await db.set("lastTelemetryPing", pingTimestamp); - } catch (err) { - console.error(err); - } + // try { + // const telemetryData = await collectTelemetryData(), + // pingTimestamp = await fetch(pingEndpoint, { + // method: "POST", + // body: JSON.stringify(telemetryData), + // }).then((res) => res.text()); + // await db.set("lastTelemetryPing", pingTimestamp); + // } catch (err) { + // console.error(err); + // } }; export { collectTelemetryData, sendTelemetryPing }; diff --git a/src/manifest.json b/src/manifest.json index 292f06d..1c79e37 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -20,7 +20,6 @@ "tabs", "storage", "userScripts", - "clipboardRead", "clipboardWrite", "unlimitedStorage" ],