sissbruecker / linkding

Self-hosted bookmark manager that is designed be to be minimal, fast, and easy to set up using Docker.
https://linkding.link/
MIT License
6.22k stars 294 forks source link

add support for web-share-target API #98

Closed fs111 closed 6 months ago

fs111 commented 3 years ago

The web-share-target API allows websites to be the target of a share action on a mobile phone. This works with chrome on android and would allow users of android to save bookmarks via the native sharing feature of the android platform.

documentation about the web-share API can be found here https://web.dev/web-share-target/

I wanted to explore that a bit, if there is interest in it from the upstream project.

sissbruecker commented 3 years ago

In general I'm OK with that, as it seems like a rather isolated thing that doesn't change much.

Note that this feature requires the website to be installed as a progressive web application first, which opens up a completely different topic. Adding a web manifest, a service worker, correct offline handling such as a offline fallback page etc.

Note that I started using a pretty nice workaround on iOS by using the integrated automation tool, which allows you to define custom workflows as share targets. In short I just configed a share action that opens the the new bookmark form in Safari while appending the shared URL as URL parameter. I'm 99% sure something similar can be achieved on Android using apps like Tasker or similar. Maybe the more pragmatic solution is to figure out a way on how to accomplish this on Android as well, and then document it in this repo so that other users can benefit from it too.

fs111 commented 3 years ago

Thanks for the reply. I actually found an easier way. Following https://paul.kinlan.me/use-bookmarklets-on-chrome-on-android/ I created a bookmark that can actually use the bookmarklet code.

LMK if you want a PR that adds this as a HOWTO to the README.

sissbruecker commented 3 years ago

@fs111 Sure, that would be cool. 👍 Can also consider opening a new how-to.md file in the docs folder.

techducks commented 1 year ago

In my opinion it would be great to add pwa features to the web app. Most people intuitively want to add a url via share menu.

you can also use my shortcut here.

The difference is that it uses the internal linkding api. You can add a url via iOS Share Menue without opening the linkding web application in a safari overlay. There just appears a system popup to add tags.

sissbruecker commented 1 year ago

Looks like the share target API still isn't supported in Safari / iOS or Firefox: https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target#browser_compatibility

sissbruecker commented 6 months ago

Should be resolved with https://github.com/sissbruecker/linkding/pull/630