A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use new clipboard API

+1 -32
+1 -32
src/Javascript/index.js
··· 418 418 } 419 419 })() 420 420 421 - copyToClipboard(await adjustedText) 421 + navigator.clipboard.writeText(await adjustedText) 422 422 }) 423 - } 424 - 425 - 426 - function copyToClipboard(text) { 427 - // Insert a textarea element 428 - const el = document.createElement("textarea") 429 - 430 - el.value = text 431 - el.setAttribute("readonly", "") 432 - el.style.position = "absolute" 433 - el.style.left = "-9999px" 434 - 435 - document.body.appendChild(el) 436 - 437 - // Store original selection 438 - const selected = document.getSelection().rangeCount > 0 439 - ? document.getSelection().getRangeAt(0) 440 - : false 441 - 442 - // Select & copy the text 443 - el.select() 444 - document.execCommand("copy") 445 - 446 - // Remove textarea element 447 - document.body.removeChild(el) 448 - 449 - // Restore original selection 450 - if (selected) { 451 - document.getSelection().removeAllRanges() 452 - document.getSelection().addRange(selected) 453 - } 454 423 } 455 424 456 425