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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross platform extension #569
Cross platform extension #569
Changes from all commits
989ac42bbdd5702e41c902b73319320c9a8File filter
Jump to
christophertinoJun 18, 2020
Member
const tabId = new URLSearchParams(window.location.search).get('tabId');
. The React app uses that
@sammacbeth Check out
ghostery-extension/app/panel-android/components/Panel.jsx
Line 48 in 498e44b
tabIdvalue to fetch data for the panel view.Using
setPopupwill require bumping our min FF Android version to 57+, which is fine.sammacbethJun 19, 2020
Author
Contributor
// The 'getPanelData' message is never sent by the panel, which uses ports only since 8.3.2
// The message is still sent by panel-android and by the setup hub as of 8.4.0
if (name === 'getPanelData') {
if (!message.tabId) {
utils.getActiveTab((tab) => {
const data = panelData.get(message.view, tab);
callback(data);
});
I was wondering why the panel seems to be working despite this, and it seems that there is code to handle the tabId parameter not being provided:
ghostery-extension/src/background.js
Lines 705 to 712 in 498e44b
This code to get the active tab could be moved into the panel code to ensure it knows which tab it refers to in case an undefined tabId introduces other issues.
christophertinoJun 19, 2020
Member
Good catch. @IAmThePan we can most likely remove that
tabIdlookup in Panel.jsx (see above)IAmThePanJun 19, 2020
Contributor
Noted. However, including the
tabIdin the URL enables Anri to open the panel (android or regular) in a webpage rather than the popup so he can do regression tests.I will incorporate these changes in my
feature/update-androidbranch. I will keep the code to open thetabIdwithout the query parameter, but I will make sure the query parameter can be included if the use (tester, or developer) wants easy access to the panel.IAmThePanJun 19, 2020
Contributor
@christophertino ^^
chrmodJun 17, 2020
Member
config.settings.HW_CHANNELshould be set toandroidfor human-web-lite.