sunbeam icon indicating copy to clipboard operation
sunbeam copied to clipboard

Add share action

Open pomdtr opened this issue 2 years ago • 1 comments

Each extension should be able to register a command as a share_target.

{
   "title": "My Command",
   "share_target": {
       "command": "sunbeam",
       "params": {
          "url": "link"
        }
    }
   "commands": [
        { "name": "command", "mode": "view", "title": "Save Link", "params": [{ "name": "link", "type": "string" }] }
   ]
}

Then from another extension can use a share action:

{
     "title": "Share Link",
     "onAction": {
        "type": "share",
        "url": "https://github.com"
     }
}

causing all commands accepting a link to be proposed.

pomdtr avatar Oct 12 '23 23:10 pomdtr

inspired by https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target

pomdtr avatar Oct 13 '23 00:10 pomdtr