mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
🍣 some little fixes in the code
- nothing changed, just some little fixes
This commit is contained in:
parent
7fa57b9e88
commit
ca65a0288d
2 changed files with 8 additions and 18 deletions
|
@ -70,14 +70,11 @@ export function resetProfileSettings() {
|
||||||
|
|
||||||
async function apiRequest<T extends object>(method: 'GET' | 'POST', pathname: string, data: T) {
|
async function apiRequest<T extends object>(method: 'GET' | 'POST', pathname: string, data: T) {
|
||||||
const settings = await getExtensionSettingsAsync()
|
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.pathname = path.join(url.pathname, pathname)
|
||||||
url.searchParams.set('data', JSON.stringify(data))
|
url.searchParams.set('data', JSON.stringify(data))
|
||||||
|
|
||||||
if (true/* requiresSignature */) {
|
|
||||||
if (!settings.privateKey || !settings.publicKey)
|
if (!settings.privateKey || !settings.publicKey)
|
||||||
throw new Error('There is no profile.')
|
throw new Error('There is no profile.')
|
||||||
|
|
||||||
|
@ -85,7 +82,6 @@ async function apiRequest<T extends object>(method: 'GET' | 'POST', pathname: st
|
||||||
signature: await sign(url.searchParams.toString(), settings.privateKey!),
|
signature: await sign(url.searchParams.toString(), settings.privateKey!),
|
||||||
publicKey: settings.publicKey
|
publicKey: settings.publicKey
|
||||||
}))
|
}))
|
||||||
}
|
|
||||||
|
|
||||||
const respond = await fetch(url.href, { method })
|
const respond = await fetch(url.href, { method })
|
||||||
|
|
||||||
|
|
|
@ -28,18 +28,12 @@ section {
|
||||||
gap: .75em;
|
gap: .75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
section>label {
|
label {
|
||||||
font-size: 1.75em;
|
font-size: 1.75em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
section>b {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
section>* {
|
section>* {
|
||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue