Skip to content

Commit

Permalink
Speculative fix for track selector not appearing on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
killergerbah committed Jun 19, 2024
1 parent dcac95d commit 4c36b51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions extension/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,12 @@ if (isFirefoxBuild) {
}
});
} else {
chrome.action.setPopup({
popup: 'popup-ui.html',
});
if (!isMobile) {
chrome.action.setPopup({
popup: 'popup-ui.html',
});
}

chrome.action.onClicked.addListener(defaultAction);
}

Expand Down
3 changes: 2 additions & 1 deletion extension/src/services/device-detection.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const isMobile = (navigator as any).userAgentData?.mobile ?? navigator.userAgent.includes('Android') ?? false;
export const isMobile =
navigator.userAgent.toLowerCase().includes('android') ?? (navigator as any).userAgentData?.mobile ?? false;

0 comments on commit 4c36b51

Please sign in to comment.