Reputation: 7265
When using chrome.webNavigation
the webNavigation
permission is needed. As stated on Permission Warnings, using that permission makes the installer to show the warning message:
Read your browsing history
In my case, I only want to listen to one specific domain, let's say domain.com
. So, I need to filter the callback for chrome.webNavigation.onCompleted.addListener()
.
Now, from the user perspective, they could distrust the chrome extension since "Read your browsing history" is too broad and the extension should only work on domain.com
.
When a match pattern is used in the permissions, a message like Read and change your data on all domain.com sites and www.domain.com
is used.
Is there any other way to use chrome.webNavigation
and only listen to one domain? where chrome extension issues/feature requests should be sent?
Update: I had to use webNavigation
in order to support AJAX calls. That is, listen to changes in the DOM and the URL made with AJAX. I solved this particular case by using a MutationObserver
. Thus, I could remove the permission. The original question was already reported as a bug by Rob W.
Upvotes: 3
Views: 565
Reputation: 349182
In this case, I've already posted a feature request over a year ago: https://crbug.com/431108 ("Allow extensions to use webNavigation API without webNavigation permission").
where chrome extension issues/feature requests should be sent?
Report feature requests and bugs at https://crbug.com/new (points to https://bugs.chromium.org).
If you want to get the equivalent effect of chrome.webNavigation.onCompleted
without using the webNavigation API or adding extra permissions, then you can declare a content script and send a message to the background page when the window.onload
event fires.
Upvotes: 4