fix: show consent dialog on firefox mobile#145
Closed
8bitgentleman wants to merge 1 commit intoActivityWatch:masterfrom
Closed
fix: show consent dialog on firefox mobile#1458bitgentleman wants to merge 1 commit intoActivityWatch:masterfrom
8bitgentleman wants to merge 1 commit intoActivityWatch:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
👍 Looks good to me! Reviewed everything up to da1f74f in 1 minute and 21 seconds
More details
- Looked at
266lines of code in3files - Skipped
0files when reviewing. - Skipped posting
3drafted comments based on config settings.
1. static/popup.html:71
- Draft comment:
Typo in the word 'wether'. It should be 'whether'. - Reason this comment was not posted:
Confidence changes required:10%
The HTML file has a minor typo in the word 'whether'.
2. static/popup.js:77
- Draft comment:
Ensure consistent use ofchromeorbrowserAPIs. Mixing them can cause compatibility issues across different browsers. - Reason this comment was not posted:
Confidence changes required:50%
The JavaScript file useschromeandbrowserAPIs interchangeably. This could lead to issues on different browsers.
3. static/style.css:81
- Draft comment:
The.consent-buttonsclass is not used in the HTML. Consider removing it if it's not needed. - Reason this comment was not posted:
Confidence changes required:20%
The CSS file has a class.consent-buttonsthat is not used in the HTML. This might be a leftover or an oversight.
Workflow ID: wflow_zSTLa5S9VI3PL4RU
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
Contributor
|
@8bitgentleman May have been fixed by #152 as it now opens a new tab instead of a new window :) |
Contributor
|
It's fixed as reported by @adminvulcano in #24 (comment) :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a fix for ActivityWatch/activitywatch#1115 where on firefox mobile the consent dialog was prevented from opening and therefore prevented from enabling the extension.
Previously
chrome.windows.create()was used to show the dialog but according to the Firefox Android documentation, the windows API is not supported on Firefox for Android since there is only one Firefox window on Android, and the browser cannot open or manipulate additional browser windows.On firefox mobile instead of opening a new page/window, we now embed the consent content directly in the window and only show/hide when requested.
Important
Fixes consent dialog issue on Firefox mobile by embedding consent content directly in the main window.
popup.htmlinstead of usingchrome.windows.create().showConsentDialog()inpopup.jsnow checksisFirefoxAndroid()to determine dialog display method.isFirefoxAndroid()function inpopup.jsto detect Firefox on Android.domListeners()inpopup.jsto handle consent actions for Firefox Android.#consent-contentdiv inpopup.htmlfor embedded consent content.style.cssfor#consent-contentand buttons.This description was created by
for da1f74f. It will automatically update as commits are pushed.