diff --git a/src/modules/crypto/index.ts b/src/modules/crypto/index.ts index 7953d9c..21f9785 100644 --- a/src/modules/crypto/index.ts +++ b/src/modules/crypto/index.ts @@ -70,22 +70,18 @@ export function resetProfileSettings() { async function apiRequest(method: 'GET' | 'POST', pathname: string, data: T) { const settings = await getExtensionSettingsAsync() - /* const urlResolverSettings = ytUrlResolversSettings[settings.urlResolver] - if (!urlResolverSettings.signRequest) throw new Error() */ - const url = new URL(ytUrlResolversSettings.madiatorFinder.href/* urlResolverSettings.href */) + const url = new URL(ytUrlResolversSettings.madiatorFinder.href) url.pathname = path.join(url.pathname, pathname) url.searchParams.set('data', JSON.stringify(data)) - if (true/* requiresSignature */) { - if (!settings.privateKey || !settings.publicKey) - throw new Error('There is no profile.') + if (!settings.privateKey || !settings.publicKey) + throw new Error('There is no profile.') - url.searchParams.set('keys', JSON.stringify({ - signature: await sign(url.searchParams.toString(), settings.privateKey!), - publicKey: settings.publicKey - })) - } + url.searchParams.set('keys', JSON.stringify({ + signature: await sign(url.searchParams.toString(), settings.privateKey!), + publicKey: settings.publicKey + })) const respond = await fetch(url.href, { method }) diff --git a/src/modules/yt/urlCache.ts b/src/modules/yt/urlCache.ts index b2c58c1..897d725 100644 --- a/src/modules/yt/urlCache.ts +++ b/src/modules/yt/urlCache.ts @@ -75,7 +75,6 @@ async function get(id: string): Promise { await clearExpired() return undefined } - console.log('cache found', id, response.value) return response.value } diff --git a/src/pages/popup/style.css b/src/pages/popup/style.css index 9e9f464..e23a9e9 100644 --- a/src/pages/popup/style.css +++ b/src/pages/popup/style.css @@ -1,6 +1,5 @@ #popup { width: 40em; - max-width: 100%; overflow: hidden; margin: auto; } @@ -40,12 +39,6 @@ label { text-align: center; } -section>b { - display: block; - width: 100%; - text-align: left; -} - section>* { padding: 0 1rem; } @@ -65,4 +58,4 @@ section>* { .toggle-option { display: grid; gap: .5em; -} \ No newline at end of file +} diff --git a/src/scripts/background.ts b/src/scripts/background.ts index 3996ccf..9b5f7fb 100644 --- a/src/scripts/background.ts +++ b/src/scripts/background.ts @@ -20,7 +20,6 @@ chrome.runtime.onMessage.addListener(({ method, data }, sender, sendResponse) => const params: Parameters = JSON.parse(data) // Don't create a new Promise for same ID until on going one is over. const promise = onGoingLbryPathnameRequest[data] ?? (onGoingLbryPathnameRequest[data] = resolveById(...params)) - console.log('lbrypathname request', params, await promise) resolve(await promise) } catch (error) { sendResponse(`error: ${(error as any).toString()}`) diff --git a/src/scripts/ytContent.tsx b/src/scripts/ytContent.tsx index 116066b..4767d58 100644 --- a/src/scripts/ytContent.tsx +++ b/src/scripts/ytContent.tsx @@ -231,7 +231,6 @@ import { getExtensionSettingsAsync, getSourcePlatfromSettingsFromHostname, getTa console.error("Background error on:", params) throw new Error(`Background error. ${response ?? ''}`) } - console.log(response) return response ? JSON.parse(response) : null }