layout-trello icon indicating copy to clipboard operation
layout-trello copied to clipboard

Narrow permissions requirements ("Read your browsing history")

Open sudonatalie opened this issue 6 years ago • 2 comments

This extension currently comes with the following warning:

Permissions

  • Read your browsing history

It would be nice to narrow the manifest permissions so this warning is no longer necessary.


Problem

The declarative content script injection is insufficient to catch navigations within the Trello site, because it uses the History pushState() API, so with that alone, the content script would not be injected when the user navigates from a non-board page to a board page within Trello.

Current Solution (webNavigation)

To work around this, we re-inject the content script on chrome.webNavigation.onHistoryStateUpdated. This requires the webNavigation permission to be declared (causing the above warning).

If this old request was implemented, we could avoid this broad warning, but that seems unlikely.

Alternative Solution (declarativeContent)

The chrome.declarativeContent.RequestContentScript API could be a better alternative, but it has 2 problems right now:

  1. It's still experimental, and likely to change in the future, so I'm not inclined to depend on it yet.
  2. It doesn't yet support injecting CSS (although we could work around that by doing it manually via the JS content script).

sudonatalie avatar Jul 27 '19 22:07 sudonatalie

This was erroneously closed because I referenced the wrong issue in my commit. Sorry about that. #37 should have been closed instead.

werenike avatar Sep 16 '19 04:09 werenike

"RequestContentScript will be deprecated" (ref), so the experimental solution above is no longer viable. This issue is now blocked on Issue 1054624: Dynamic content script support instead. If/when dynamic content scripts reach stable, I expect that to be the canonical solution.

sudonatalie avatar Mar 09 '21 01:03 sudonatalie