fiji / fiji.github.io

Fiji website
https://fiji.sc
35 stars 11 forks source link

Issue 9: Replaced "navigator.appVersion" with "navigator.userAgent" i… #10

Closed turekg closed 4 years ago

turekg commented 4 years ago

This should fix the problem with some OS information not being picked up by the download script.

Closes #9.

carandraug commented 4 years ago

Indeed, appVersion should not be the place to look for OS information. The standards:

appVersion: Must return either the string "4.0" or a string representing the version of the browser in detail, e.g. "1.0 (VMS; en-US) Mellblomenator/9000".

but instead of userAgent, maybe platform is more specific? From the standards:

platform: Must return either the empty string or a string representing the platform on which the browser is executing, e.g. "MacIntel", "Win32", "FreeBSD i386", "WebTV OS".

ctrueden commented 4 years ago

Thanks @carandraug.

@turekg Could you please test out using platform on all supported platforms, and see whether that is effective?

turekg commented 4 years ago

Tested and confirmed that "platform" is an even better solution, code updated.

carandraug commented 4 years ago

7cba001 replaces userAgent with platform for windows only. In the case of Mac and Linux, it still checks userAgent. Was that on purpose?

ctrueden commented 4 years ago

@carandraug Thanks for catching that. Fixed in 47ae7fdf09ab9322f1b26aae551960d4ee2af7e9.