diff --git a/manifest.json b/manifest.json index 93c3cb9..49d375a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "WidevineProxy2", - "version": "0.8.1", + "version": "0.8.2", "permissions": [ "activeTab", "tabs", diff --git a/panel/panel.css b/panel/panel.css index f147dec..ef1f017 100644 --- a/panel/panel.css +++ b/panel/panel.css @@ -17,6 +17,9 @@ select { #downloader-name { width: 160px; } +#export { + margin-top: 5px; +} /* Dark mode */ diff --git a/panel/panel.html b/panel/panel.html index c9d2d2a..a20599a 100644 --- a/panel/panel.html +++ b/panel/panel.html @@ -60,6 +60,7 @@ +
Keys diff --git a/panel/panel.js b/panel/panel.js index e89b4f0..659b312 100644 --- a/panel/panel.js +++ b/panel/panel.js @@ -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'); @@ -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 ================