diff --git a/README.md b/README.md index c03f160..686187c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ This addon requires a Widevine Device file to work, which is not provided by thi ## Installation + Chrome - 1. Download this repository as a ZIP file + 1. Download the ZIP file from the [releases section](https://github.com/DevLARLEY/WidevineProxy2/releases) 2. Navigate to `chrome://extensions/` 3. Enable `Developer mode` 4. Drag-and-drop the downloaded file into the window @@ -32,7 +32,7 @@ This addon requires a Widevine Device file to work, which is not provided by thi 3. Click the settings icon and choose `Install Add-on From File...` 4. Select the downloaded file + Temporary installation - 1. Download this repository as a ZIP file + 1. Download the ZIP file from the [releases section](https://github.com/DevLARLEY/WidevineProxy2/releases) 2. Navigate to `about:debugging#/runtime/this-firefox` 3. Click `Load Temporary Add-on...` and select the downloaded file @@ -45,7 +45,7 @@ pywidevine create-device -k device_private_key -c device_client_id_blob -t "ANDR Now, open the extension, click `Choose File` and select your Widevine Device file. ### Remote CDM -If you don't already have a `remote.json` file, open the API URL in the browser (if provided) and save the response as `remote.json`. \ n +If you don't already have a `remote.json` file, open the API URL in the browser (if provided) and save the response as `remote.json`. \ Now, open the extension, click `Choose remote.json` and select the json file provided by your API. diff --git a/manifest.json b/manifest.json index 1032811..4107c19 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "WidevineProxy2", - "version": "0.7", + "version": "0.7.2", "permissions": [ "activeTab", "tabs", diff --git a/panel/panel.css b/panel/panel.css index 4093433..b2f3804 100644 --- a/panel/panel.css +++ b/panel/panel.css @@ -2,6 +2,7 @@ body { font-family: Arial, sans-serif; background-color: #ffffff; color: black; + width: 400px; } button:not(.toggleButton), select { padding: 4px; @@ -12,6 +13,7 @@ button:not(.toggleButton), select { button, select { background-color: #e1e1e1; border: none; + max-width: 330px; } .text-box { outline: none; diff --git a/panel/panel.js b/panel/panel.js index 25895b9..b4e438b 100644 --- a/panel/panel.js +++ b/panel/panel.js @@ -47,6 +47,8 @@ remove.addEventListener('click', async function() { const selected_option = wvd_combobox.options[wvd_combobox.selectedIndex]; if (selected_option) { await DeviceManager.saveSelectedWidevineDevice(selected_option.text); + } else { + await DeviceManager.removeSelectedWidevineDeviceKey(); } }); @@ -58,6 +60,8 @@ remote_remove.addEventListener('click', async function() { const selected_option = remote_combobox.options[remote_combobox.selectedIndex]; if (selected_option) { await RemoteCDMManager.saveSelectedRemoteCDM(selected_option.text); + } else { + await RemoteCDMManager.removeSelectedRemoteCDMKey(); } }) diff --git a/util.js b/util.js index 4cafade..a6ba34d 100644 --- a/util.js +++ b/util.js @@ -136,6 +136,10 @@ export class DeviceManager { await AsyncSyncStorage.setStorage({ devices: array }); await AsyncSyncStorage.removeStorage([selected_device_name]); } + + static async removeSelectedWidevineDeviceKey() { + await AsyncSyncStorage.removeStorage(["selected"]); + } } export class RemoteCDMManager { @@ -197,6 +201,10 @@ export class RemoteCDMManager { await AsyncSyncStorage.setStorage({ remote_cdms: array }); await AsyncSyncStorage.removeStorage([selected_remote_cdm_name]); } + + static async removeSelectedRemoteCDMKey() { + await AsyncSyncStorage.removeStorage(["selected_remote_cdm"]); + } } export class SettingsManager {