diff options
author | sgiehl <stefan@matomo.org> | 2022-07-06 10:00:28 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2022-07-06 10:00:28 +0300 |
commit | 7ca5b3c432532f9ed11cf7cdbe01c3b57270c368 (patch) | |
tree | 264031bb551e19b7a1b78c22f591db2154020d54 | |
parent | bca3741daba71900324c9128cd6ab3134e071f25 (diff) |
fix client hints detection demo
-rw-r--r-- | plugins/DevicesDetection/templates/detection.twig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/DevicesDetection/templates/detection.twig b/plugins/DevicesDetection/templates/detection.twig index c78dcf1284..28213e81f8 100644 --- a/plugins/DevicesDetection/templates/detection.twig +++ b/plugins/DevicesDetection/templates/detection.twig @@ -6,13 +6,15 @@ <script type="text/javascript"> + var clientHints = {}; + $(document).ready(function() { if (!navigator.userAgentData || typeof navigator.userAgentData.getHighEntropyValues !== 'function') { $('#noclienthints').css({display: 'inline-block'}); $('[name=clienthints],.usech').hide(); } else { // Initialize with low entropy values that are always available - var clientHints = { + clientHints = { brands: navigator.userAgentData.brands, platform: navigator.userAgentData.platform }; |