Skip to content

Commit

Permalink
refactor: rename consts
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalygashkov committed Mar 19, 2024
1 parent f00b2e4 commit 5aaa97e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions background.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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;
Expand All @@ -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}' \\`;
Expand Down

0 comments on commit 5aaa97e

Please sign in to comment.