chg: Copy pandora link into clipboard

pull/502/head
Raphaël Vinot 2022-08-25 15:08:08 +02:00
parent c42de0565c
commit 2be8a4e4ff
1 changed files with 4 additions and 1 deletions

View File

@ -69,7 +69,10 @@
}) })
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
openURLInNewTab(data.link) if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(data.link);
}
openURLInNewTab(data.link);
}) })
.catch((error) => { .catch((error) => {
throw new Error(error); throw new Error(error);