sissbruecker / linkding-extension

Companion extension for linkding
MIT License
158 stars 34 forks source link

Use page action instead of browser action #7

Open MaybeThisIsRu opened 3 years ago

MaybeThisIsRu commented 3 years ago

I'm new to web extensions. While working on #5, I came across the difference between a page action and a browser action. This MDN page section lists the differences.

Key to note is that linkding bookmarks current page: that neatly fits into the definition of a page action. Especially once you look at the table presented on the MDN page itself:

image

I'm unsure how Chrome would handle this, or how it translates to mobile browsers. I'll follow up soon with some more research. In the meantime, curious to hear more thoughts on this from the community.

One thing a page action would definitely require is a monochrome icon like these other ones (Pocket, Firefox's native bookmark page icon):

image

sissbruecker commented 3 years ago

I have no opinions on this, however seeing that things "just work" ATM, I don't see an issue. Definitely needs checking with Chrome, I don't think I've seen anything like this in their URL bar. In general web extensions are not really a standard, and the recommendations on MDN may only refer to best practices for Firefox addon developers. At some point Mozilla decided to move away from their old extension model and then adapted like 99% of what Chrome already had as API while adding some of their own stuff. So while most of it works in both there are differences.