From 5aaa97eb10a56bf71f8e26c54663164c92a8e3d5 Mon Sep 17 00:00:00 2001 From: Vitaly Gashkov Date: Tue, 19 Mar 2024 11:13:23 +0500 Subject: [PATCH] refactor: rename consts --- background.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/background.js b/background.js index 62dfd33..a50244b 100644 --- a/background.js +++ b/background.js @@ -1,8 +1,4 @@ -const tabIDs = {}; -const textDecoder = new TextDecoder(); - -const executablePrefix = `npm start --`; - +const EXECUTABLE_PATH = 'streamyx.exe'; const SERVERS_WITH_DISPOSABLE_TOKENS = [ 's95951.cdn.ngenix.net', 'api2.hbogoasia.com/onwards-widevine', @@ -12,6 +8,9 @@ const SERVERS_WITH_DISPOSABLE_TOKENS = [ 'license.vdocipher.com/auth', ]; +const tabIDs = {}; +const textDecoder = new TextDecoder(); + function requestToClipboard(tabId) { chrome.tabs.get(tabId, (details) => { const lic_headers = tabIDs[details.id].license_request[0]?.license_headers; @@ -32,7 +31,7 @@ function requestToClipboard(tabId) { console.log(ip_resposnse); var i = 0; - let command = `${executablePrefix} `; + let command = `${EXECUTABLE_PATH} `; command += `'${lic_url}' \\`; for (; i < lic_headers.length; ++i) command += `\n -H '${lic_headers[i].name.toLowerCase()}: ${lic_headers[i].value}' \\`;