improves handling of user data
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export const get_pathname_from_url = (src: string) => {
|
||||
if (src.startsWith('http')) return new URL(src).pathname;
|
||||
else return new URL(src, 'https://svelte.dev').pathname;
|
||||
};
|
||||
@@ -1,2 +1 @@
|
||||
export * from './seconds-to-timestamp';
|
||||
export * from './use-state';
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { user_preferences } from '$lib/preferences';
|
||||
import { podcast_progress } from '$lib/progress';
|
||||
|
||||
export function load_podcast_state() {
|
||||
podcast_progress.load();
|
||||
user_preferences.load();
|
||||
}
|
||||
Reference in New Issue
Block a user