Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

feat(chrome-extension): add privacy policy and improve logo URL handling

AykutSaracc8ba3991dbfa
diff --git a/apps/chrome-extension/PRIVACY.md b/apps/chrome-extension/PRIVACY.md
new file mode 100644
index 00000000..ce1c0b99
--- /dev/null
+++ b/apps/chrome-extension/PRIVACY.md
@@ -0,0 +1,52 @@
+# Privacy Policy for JSON Crack Chrome Extension
+
+**Effective Date:** April 10, 2026
+
+This Privacy Policy describes how the JSON Crack Chrome Extension (the "Extension") handles information.
+
+## 1. Scope
+
+This policy applies to the Chrome Extension published from this project.
+
+## 2. Information Processed by the Extension
+
+When active on a page, the Extension may:
+
+- Read page text to determine whether the page contains JSON.
+- Parse and render JSON content locally in the tab to provide graph visualization.
+- Read system light/dark preference to set visual theme.
+- Write to clipboard only when you click a copy button in the node modal.
+
+## 3. Data Collection, Storage, and Sharing
+
+As of the effective date above, the Extension is designed to minimize data handling:
+
+- No account or sign-in is required.
+- No analytics or telemetry SDK is included in the Extension source.
+- No persistent storage is used for page JSON data (including `localStorage`, `sessionStorage`, `indexedDB`, or Chrome extension storage).
+- Page JSON content is not automatically transmitted to JSON Crack servers.
+- We do not sell personal information through the Extension.
+
+## 4. External Links
+
+The Extension does not send page JSON data to our servers.
+
+The Extension can also open external URLs only when you click a link (for example attribution, upgrade links, or URL values in graph nodes). Any external site you open is governed by that site's own terms and privacy policy.
+
+## 5. Permissions
+
+The Extension uses a broad content-script match pattern (`<all_urls>`) so it can detect JSON pages across domains. As of April 10, 2026, the manifest does not request additional explicit Chrome API permissions.
+
+## 6. Retention
+
+JSON content handled by the Extension is processed in-memory within the active page context and is not intentionally retained by the Extension after the tab/session ends.
+
+## 7. Changes to This Policy
+
+We may update this policy. Any update will be reflected by changing the effective date above.
+
+## 8. Contact
+
+For privacy questions related to the Extension, use:
+
+- https://github.com/AykutSarac/jsoncrack.com/issues
diff --git a/apps/chrome-extension/src/content-script.tsx b/apps/chrome-extension/src/content-script.tsx
index a4d05f14..001a7f27 100644
--- a/apps/chrome-extension/src/content-script.tsx
+++ b/apps/chrome-extension/src/content-script.tsx
@@ -11,6 +11,18 @@ const NODE_MODAL_BACKDROP_ID = "jsoncrack-node-modal-backdrop";
const GRAPH_OVERLAY_ID = "jsoncrack-graph-overlay";
const TOGGLE_ID = "jsoncrack-toggle";
+const getExtensionAssetUrl = (path: string) => {
+ const runtime = (
+ globalThis as {
+ chrome?: { runtime?: { getURL?: (assetPath: string) => string } };
+ }
+ ).chrome?.runtime;
+
+ return runtime?.getURL?.(path) ?? "";
+};
+
+const TO_DIAGRAM_LOGO_URL = getExtensionAssetUrl("icons/logo.svg");
+
let jsonCrackComponentPromise: Promise<JSONCrackComponentType> | null = null;
const loadJsonCrackComponent = async (): Promise<JSONCrackComponentType> => {
@@ -373,13 +385,15 @@ function NodeLimitUpgrade() {
return (
<div id="jsoncrack-upgrade-overlay">
<div id="jsoncrack-upgrade-card">
- <img
- src="https://todiagram.com/logo.svg"
- alt="ToDiagram"
- width={48}
- height={48}
- className="jsoncrack-upgrade-logo"
- />
+ {TO_DIAGRAM_LOGO_URL ? (
+ <img
+ src={TO_DIAGRAM_LOGO_URL}
+ alt="ToDiagram"
+ width={48}
+ height={48}
+ className="jsoncrack-upgrade-logo"
+ />
+ ) : null}
<span className="jsoncrack-upgrade-badge">Upgrade Required</span>
<h2 className="jsoncrack-upgrade-title">Your diagram is too large</h2>
<p className="jsoncrack-upgrade-desc">