Skip to content

Commit

Permalink
Return faster
Browse files Browse the repository at this point in the history
  • Loading branch information
mokimo committed Aug 8, 2024
1 parent b2164c9 commit 82a6461
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1000,11 +1000,12 @@ export function scrollToHashedElement(hash) {
}

function logPagePerf() {
if (getMetadata('pageperf') !== 'on') return;
const consent = document.cookie.split('OptanonConsent=')[1];
const performanceGroup = 'C0002:1';
const performanceConsent = consent?.includes(encodeURIComponent(performanceGroup))
|| consent?.includes(performanceGroup);
if (getMetadata('pageperf') !== 'on' || !performanceConsent) return;
if (!performanceConsent) return;
const isChrome = () => {
const nav = window.navigator;
return nav.userAgent.includes('Chrome') && nav.vendor.includes('Google');
Expand Down

0 comments on commit 82a6461

Please sign in to comment.