layout-trello
layout-trello copied to clipboard
Narrow permissions requirements ("Read your browsing history")
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:
- It's still experimental, and likely to change in the future, so I'm not inclined to depend on it yet.
- It doesn't yet support injecting CSS (although we could work around that by doing it manually via the JS content script).
This was erroneously closed because I referenced the wrong issue in my commit. Sorry about that. #37 should have been closed instead.
"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.