Skip to content

Commit

Permalink
+ Set static width of popup window
Browse files Browse the repository at this point in the history
+ Fixed removal of `selected` key from sync storage
  • Loading branch information
DevLARLEY committed Oct 27, 2024
1 parent b022d8c commit 86f3c5b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

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


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "WidevineProxy2",
"version": "0.7",
"version": "0.7.2",
"permissions": [
"activeTab",
"tabs",
Expand Down
2 changes: 2 additions & 0 deletions panel/panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ body {
font-family: Arial, sans-serif;
background-color: #ffffff;
color: black;
width: 400px;
}
button:not(.toggleButton), select {
padding: 4px;
Expand All @@ -12,6 +13,7 @@ button:not(.toggleButton), select {
button, select {
background-color: #e1e1e1;
border: none;
max-width: 330px;
}
.text-box {
outline: none;
Expand Down
4 changes: 4 additions & 0 deletions panel/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});

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

Expand Down
8 changes: 8 additions & 0 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 86f3c5b

Please sign in to comment.