forked from wakatime/browser-wakatime
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Add permission for (api.)wakatime.com on Firefox. 2. Request permission for the API URL set by the user. 3. Restrict content script to run on meet.google.com only. This involves some strange logic about the host permissions: - If an origin is listed in `content_scripts.matches`, then the browser shows that the extension has permission to access data on that website. However, the background service worker cannot send cross-site requests to that URL. - If an origin is listed in both `content_scripts.matches` and `optional_host_permissions`, then the background service worker can send cross-site requests to that URL. So it's not possible to inject content scripts on all websites but conditionally ask for cross-site request permissions for specific websites only. Now it seems that the content script only works for meet.google.com. More websites may be added if needed later. An alternative solution is to use `scripting.registerContentScripts()` to dynamically register content script for websites, so that users can reject permissions on some websites and continue to use the extension. This could be implemented later. This should fix wakatime#291
- Loading branch information
Showing
4 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters