dessant / search-by-image

Browser extension for reverse image search, available for Chrome, Edge and Safari

Home Page:https://apps.apple.com/us/app/search-by-image-for-safari/id1544552106

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform webhint warning

xayanide opened this issue · comments

System

  • OS name: Windows
  • OS version: 10
  • Browser name: Edge
  • Browser version: 103.0.1264.37 (Official build) (64-bit)
  • Extension version: 5.0.0

Bug description

I think that this is an insignificant and minor issue. I am not sure when this happened since I had discovered it from the browser's DevTools, it has webhint integrated.

Looking up the console logs in inspect element on any website, I always see this warning from the Issues tab, disabling, deleting the extension or going incognito mode gets rid of this webhint warning.

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.

To fix this issue, replace the usage of navigator.userAgent, > navigator.appVersion, and navigator.platform with feature > detection, progressive enhancement, or migrate to > navigator.userAgentData.

Note that for performance reasons, only the first access to one of the properties is shown.

AFFECTED RESOURCES
1 source
script.js:1

Hovering the cursor over the affected resource called script.js:1, a tooltip will be seen, leading us back to this extension.

chrome-extension://cnojnbdhbhnkbcieeekonklommdnndci/src/insert/script.js

While this wasn't really affecting anything about functionality, I think this webhint can be fixed so that the warning will no longer appear regardless of its insignificance.

This warning is present on most sites without the extension, even on Chrome's new tab page. I agree that at some point we should find alternative ways to request the same data, but navigator.platform and navigator.userAgent are still universally supported, while the alternative API is experimental. The internals of the extension and log messages meant for developers should not concern users, unless something stops working.