diff --git a/README.md b/README.md index 6d24ad8..57f5c4a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ -## WVGuesserExtension +## WVGuesserExtension-NextGen +Extension works standalone. +Not anymore need WVCore.Server API setup! ### Instalation -1. Setup [Guesser API](https://github.com/nilaoda/WVCore.Server) ([Guide](https://github.com/nilaoda/Blog/discussions/58#discussioncomment-9052557)) - -2. Install extension +1. Donwload or clone this code +2. At the same directory of `manifest.json`(root directory of this extension), put the device file named `device.wvd` +3. Install extension * Firefox diff --git a/background.js b/background.js index 5631e01..ebf43aa 100644 --- a/background.js +++ b/background.js @@ -1,7 +1,7 @@ let psshs=[]; let requests=[]; function convertHeaders(obj){ - return Object.fromEntries(obj.map(header => [header.name, header.value])) + return JSON.stringify(Object.fromEntries(obj.map(header => [header.name, header.value]))) } chrome.webRequest.onBeforeSendHeaders.addListener( function(details) { diff --git a/manifest.json b/manifest.json index 47662dc..8624855 100644 --- a/manifest.json +++ b/manifest.json @@ -26,5 +26,6 @@ "browser_action": { "default_title": "Widevine Guessor" }, - "web_accessible_resources": ["inject.js"] + "web_accessible_resources": ["inject.js"], + "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" } diff --git a/popup.html b/popup.html index 9456276..5917265 100644 --- a/popup.html +++ b/popup.html @@ -3,6 +3,7 @@