Riff / Built on the open web / Interface

Clipboard

Copies the link where there is no share sheet.

Now Playing on a wide screen: the Song and Video switch at the top, the cover on the left, the Up next list on the right, and the player bar along the bottom
On a desktop with no share sheet the Share chip copies the link.

How Riff uses it

When the browser has no share sheet, the Share chip writes the post's URL to the clipboard and shows a Copied message in the status toast for 2.5 seconds. Any error is caught and nothing is reported.

Why

Desktop browsers mostly lack navigator.share, so copying is the only thing the chip can do there.

Without it

A failing write is caught and the toast does not appear.

Where

Links open the source at the commit this page was published from.

Reference: Clipboard on MDN.