From 5678c9b5da37f141f43a26c484bae010d06297d7 Mon Sep 17 00:00:00 2001 From: voldemort <5692900+yell0wsuit@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:00:59 +0700 Subject: [PATCH] add manifest URL in frontend --- frontend/index.html | 2 +- frontend/src/components/results.jsx | 44 +++++++++++++++++++++++------ src/background.js | 5 ++++ 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index cb4ef3c..8d5c386 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,7 +2,7 @@ - + CDRM Decryption Extension v%APPVERSION% diff --git a/frontend/src/components/results.jsx b/frontend/src/components/results.jsx index 1f57730..8339113 100644 --- a/frontend/src/components/results.jsx +++ b/frontend/src/components/results.jsx @@ -5,14 +5,23 @@ function Results() { const [pssh, setPssh] = useState(""); const [licenseUrl, setLicenseUrl] = useState(""); const [keys, setKeys] = useState([]); + const [manifestUrl, setManifestUrl] = useState(""); useEffect(() => { chrome.storage.local.get( - ["drmType", "latestPSSH", "latestLicenseRequest", "latestKeys", "licenseURL"], + [ + "drmType", + "latestPSSH", + "latestLicenseRequest", + "latestKeys", + "licenseURL", + "manifestURL", + ], (result) => { if (result.drmType) setDrmType(result.drmType); if (result.latestPSSH) setPssh(result.latestPSSH); if (result.licenseURL) setLicenseUrl(result.licenseURL); + if (result.manifestURL) setManifestUrl(result.manifestURL); if (result.latestKeys) { try { const parsed = Array.isArray(result.latestKeys) @@ -38,6 +47,9 @@ function Results() { if (changes.licenseURL) { setLicenseUrl(changes.licenseURL.newValue); } + if (changes.manifestURL) { + setManifestUrl(changes.manifestURL.newValue); + } if (changes.latestKeys) { setKeys(changes.latestKeys.newValue); } @@ -54,6 +66,7 @@ function Results() { drmType: "None", latestPSSH: "None", licenseURL: "None", + manifestURL: "None", latestKeys: [], }); @@ -97,39 +110,52 @@ function Results() { > Capture current tab +

DRM Type

+ +

Manifest URL

+ +

PSSH

+

License URL

+

Keys

-
+
{Array.isArray(keys) && keys.filter((k) => k.type !== "SIGNING").length > 0 ? ( keys .filter((k) => k.type !== "SIGNING") .map((k) => `${k.key_id || k.keyId}:${k.key}`) .join("\n") ) : ( - None + [Not available] )}
diff --git a/src/background.js b/src/background.js index bb1e2be..da9c10f 100644 --- a/src/background.js +++ b/src/background.js @@ -33,6 +33,11 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { chrome.storage.local.set({ licenseURL: data }); break; + case "MANIFEST_URL_FOUND": + console.log("Storing Manifest URL:", data); + chrome.storage.local.set({ manifestURL: data }); + break; + default: console.warn("Unknown message type received:", type); }