in media/js/base/site.js [196:238]
(function () {
window.site.platform = window.site.getPlatform();
// For browsers that support client hints, get high entropy
// values that might be frozen in the regular user agent string.
if (
'userAgentData' in navigator &&
typeof navigator.userAgentData.getHighEntropyValues === 'function'
) {
navigator.userAgentData
.getHighEntropyValues(['bitness', 'platformVersion'])
.then(function (ua) {
if (ua.platformVersion) {
if (window.site.platform === 'windows') {
window.site.platformVersion =
window.site.getWindowsVersionClientHint(
ua.platformVersion
);
} else {
window.site.platformVersion = ua.platformVersion;
}
}
if (ua.bitness) {
window.site.archSize =
window.site.getArchSizeClientHint(ua.bitness);
}
updateHTML();
})
.catch(function () {
// some browsers might deny accessing high entropy info
// and reject the promise, so fall back to UA string instead.
getHighEntropyFromUAString();
updateHTML();
});
}
// Else fall back to UA string parsing for non-supporting browsers.
else {
getHighEntropyFromUAString();
updateHTML();
}
})();