Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@matomo.org>2022-07-06 10:00:28 +0300
committersgiehl <stefan@matomo.org>2022-07-06 10:00:28 +0300
commit7ca5b3c432532f9ed11cf7cdbe01c3b57270c368 (patch)
tree264031bb551e19b7a1b78c22f591db2154020d54
parentbca3741daba71900324c9128cd6ab3134e071f25 (diff)
fix client hints detection demo
-rw-r--r--plugins/DevicesDetection/templates/detection.twig4
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
};