Skip to content

Commit

Permalink
Overload Navigator.maxTouchPoints property for Android and iOS devices (
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam authored Jul 16, 2024
1 parent 50aee55 commit ff9dc31
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/entrypoints/content/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ import type { DeepWriteable } from '~/types'
overload(n, 'oscpu', undefined, { force: true })
}

/**
* @link https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints
*/
switch (payload.current.os) {
case 'android':
case 'iOS':
overload(n, 'maxTouchPoints', n.maxTouchPoints || 10)
break
}

// to test, execute in the console: `console.log(navigator.vendor)`
switch (payload.current.browser) {
case 'chrome':
Expand Down

0 comments on commit ff9dc31

Please sign in to comment.