+ Set static width of popup window

+ Fixed removal of `selected` key from sync storage
This commit is contained in:
DevLARLEY
2024-10-27 12:04:28 +01:00
parent b022d8cade
commit 86f3c5bfa3
5 changed files with 18 additions and 4 deletions

View File

@@ -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.

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "WidevineProxy2",
"version": "0.7",
"version": "0.7.2",
"permissions": [
"activeTab",
"tabs",

View File

@@ -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;

View File

@@ -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();
}
})

View File

@@ -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 {