mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 05:08:00 +02:00
Playlist Art, Minor Fixes
This commit is contained in:
parent
abcd8eb7b5
commit
a88c9081f1
8 changed files with 60 additions and 18 deletions
|
@ -6,11 +6,13 @@ const c = [
|
|||
'linear-gradient(45deg, #d08770, #bf616a)',
|
||||
];
|
||||
|
||||
export function useColors() {
|
||||
return c;
|
||||
}
|
||||
|
||||
export function useRand() {
|
||||
const i = Math.floor(Math.random() * c.length);
|
||||
return c[i];
|
||||
}
|
||||
|
||||
export function useRandColor() {
|
||||
const r = Math.random().toString(16)
|
||||
|
||||
return '#' + r.substr(r.length - 6)
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
import { useStore } from './util.js'
|
||||
|
||||
export function getPipedQuery() {
|
||||
const papi = new URLSearchParams(location.search).get('pipedapi');
|
||||
|
||||
|
@ -31,7 +33,7 @@ export async function getJson(url) {
|
|||
export async function getJsonPiped(path) {
|
||||
const root =
|
||||
new URLSearchParams(location.search).get('pipedapi') ||
|
||||
localStorage.getItem('pipedapi') ||
|
||||
useStore().getItem('pipedapi') ||
|
||||
'pipedapi.kavin.rocks';
|
||||
|
||||
return await getJson('https://' + root + path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue