Skip to content

Commit

Permalink
navigator.platform is depricated
Browse files Browse the repository at this point in the history
  • Loading branch information
bwmp committed Jun 1, 2024
1 parent 05c10ac commit 4b68bc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export default component$(() => {
useQwikSpeak({ config, translationFn });

useOnDocument('load', $(() => {
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) {
let platform = navigator.userAgentData.platform || navigator.platform || 'unknown';
if (platform.toUpperCase().indexOf('MAC') >= 0) {
document.querySelectorAll('.scale-for-mac').forEach(function(element) {
element.classList.add('macos-zoom-fix');
});
Expand Down

0 comments on commit 4b68bc9

Please sign in to comment.