From ca65a0288d9acb22e7950925471e04c8c0079adc Mon Sep 17 00:00:00 2001 From: Shiba <44804845+DeepDoge@users.noreply.github.com> Date: Wed, 10 Aug 2022 10:18:04 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=A3=20some=20little=20fixes=20in=20the?= =?UTF-8?q?=20code=20-=20nothing=20changed,=20just=20some=20little=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crypto/index.ts | 18 +++++++----------- src/pages/popup/style.css | 8 +------- 2 files changed, 8 insertions(+), 18 deletions(-) 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/pages/popup/style.css b/src/pages/popup/style.css index f492c52..506dfa9 100644 --- a/src/pages/popup/style.css +++ b/src/pages/popup/style.css @@ -28,18 +28,12 @@ section { gap: .75em; } -section>label { +label { font-size: 1.75em; font-weight: bold; text-align: center; } -section>b { - display: block; - width: 100%; - text-align: left; -} - section>* { padding: 0 1rem; }