Skip to content

Commit

Permalink
+ Added option to export logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Nov 1, 2024
1 parent 5dce1d0 commit b5ef7d0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
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.8.1",
"version": "0.8.2",
"permissions": [
"activeTab",
"tabs",
Expand Down
3 changes: 3 additions & 0 deletions panel/panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ select {
#downloader-name {
width: 160px;
}
#export {
margin-top: 5px;
}


/* Dark mode */
Expand Down
1 change: 1 addition & 0 deletions panel/panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<label for="downloader-name">Executable name: </label>
<input type="text" class="text-box" id="downloader-name">
</fieldset>
<button type="button" id="export">Export Logs</button>
</fieldset>
<fieldset>
<legend>Keys</legend>
Expand Down
8 changes: 7 additions & 1 deletion panel/panel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "../protobuf.min.js";
import "../license_protocol.js";
import { base64toUint8Array, DeviceManager, RemoteCDMManager, SettingsManager } from "../util.js";
import {AsyncLocalStorage, base64toUint8Array, stringToUint8Array, DeviceManager, RemoteCDMManager, SettingsManager} from "../util.js";

const key_container = document.getElementById('key-container');

Expand Down Expand Up @@ -29,6 +29,12 @@ remote_select.addEventListener('change', async function (){
await SettingsManager.saveSelectedDeviceType("REMOTE");
}
});

const export_button = document.getElementById('export');
export_button.addEventListener('click', async function() {
const logs = await AsyncLocalStorage.getStorage(null);
SettingsManager.downloadFile(stringToUint8Array(JSON.stringify(logs)), "logs.json");
});
// ======================================

// ================ Widevine Device ================
Expand Down

0 comments on commit b5ef7d0

Please sign in to comment.