Closes #110, Added support for Portuguese

This commit is contained in:
Shiny Nematoda 2023-02-25 17:37:17 +00:00 committed by vrifox
parent 1b5d6d4ae1
commit 0a81fcf341
No known key found for this signature in database
GPG key ID: D40098E5B60B2197
7 changed files with 55 additions and 33 deletions

View file

@ -35,6 +35,23 @@ export function useStore() {
}
}
export function useShare(data) {
if ('share' in navigator) {
navigator.share(data).catch(err => {
console.err(err);
});
} else {
navigator.clipboard.writeText(data.url).then(
() => {
alert('Copied to Clipboard');
},
err => {
alert(err);
},
);
}
}
export function useMetadata(url, urls, data) {
if ('mediaSession' in navigator) {
const now = urls.find(u => u.url === url);