Skip to content

Commit

Permalink
wip: 🔕 temporary commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam committed Apr 29, 2024
1 parent 212d75f commit 96ad14c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/entrypoints/content/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import type { ContentScriptPayload } from '~/shared/types'
}

overload(n, 'userAgent', payload.current.userAgent)
overload(n, 'appVersion', payload.current.userAgent.replace(/^Mozilla\//i, '')) // remove the "Mozilla/" prefix
overload(n, 'appVersion', undefined) // always undefined

// to test, execute in the console: : `debug(navigator.platform, navigator.oscpu)`
switch (payload.platform) {
Expand Down
5 changes: 3 additions & 2 deletions website/sandbox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* `navigator.appVersion`
*
* @type {String}
* @type {String|undefined}
*/
navigatorAppVersion

Expand Down Expand Up @@ -120,8 +120,8 @@

data.timestamp = Date.now()
data.navigatorUserAgent = navigator.userAgent
data.navigatorAppVersion = navigator?.appVersion
data.navigatorPlatform = navigator?.platform
data.navigarotAppVersion = navigator?.appVersion
data.navigatorOsCPU = navigator.oscpu ? String(navigator.oscpu) : undefined
data.navigatorVendor = navigator?.vendor
data.navigatorUserAgentDataBrands = navigator?.userAgentData?.brands
Expand Down Expand Up @@ -482,6 +482,7 @@

debug('To get the actual property/method values, you can use one of the following code snippet:\n' + [
'navigator.userAgent',
'navigator.appVersion',
'navigator.platform',
'navigator.oscpu',
'navigator.vendor',
Expand Down

0 comments on commit 96ad14c

Please sign in to comment.