mohnish/rearrange-tabs

Browser History Permission

Closed this issue · 6 comments

First off thank you for a great simple and open source (fuck yeah!) extension.
My issue is more of a question: why does this extension require access to users' browser history?

@rsynnest Thank you for the kind words 👍

I will review the permissions and see why the tabs permission is required. IIRC the tabs permission includes the access to all the tabs and how they're laid out. I remember another permission called activeTab, but, I can't remember if that was sufficient to handle the rearrangement of tabs. However, I will review the permissions and see if there's a "simpler" permission available, that can be used to implement the tab rearrangement functionality. There's absolutely no need to request more permissions than the ones necessary. If I find another permission that works with this use case, I will update the extension with that. Thanks for bringing this up.

@mohnish I have this running successfully (tested highlighted, pinnned, and regular tabs) by simply changing the permission "tabs" to "activeTab". No other code change required! With this change the permission message to the user is "this extension requires no special permissions".

I'm pretty sure you don't even need to ask for any permissions to reorder the tabs.

From https://developer.chrome.com/extensions/tabs:

The majority of the chrome.tabs API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab.

@LGabAnnell you are correct, no permissions are needed to reorder tabs. You can remove the permission block entirely from manifest.json and the extension is still 100% functional. PR submitted

Hey @rsynnest, thank you for the PR. I'm sorry I was out of town attending a family emergency. I will take a look at it tomorrow. Appreciate your work.

@LGabAnnell thanks and appreciate your input on this one.

Fixed this in #20