mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-11 13:46:17 +00:00
fix: don't show analytics dialog if the user is a crawler
This commit is contained in:
5
src/lib/utils.ts
Normal file
5
src/lib/utils.ts
Normal file
File diff suppressed because one or more lines are too long
@@ -26,6 +26,7 @@
|
||||
|
||||
import { RV_GOOGLE_TAG_MANAGER_ID } from '$env/static/public';
|
||||
import FooterHost from '$layout/Footer/FooterHost.svelte';
|
||||
import { isCrawler } from '$lib/utils';
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
@@ -66,7 +67,7 @@
|
||||
allowAnalytics = localStorage.getItem('analytics') === 'true';
|
||||
if (allowAnalytics) enableAnalytics();
|
||||
} else {
|
||||
showConsentModal = true;
|
||||
showConsentModal = !isCrawler(navigator.userAgent);
|
||||
}
|
||||
|
||||
new DateTriggerEventHandler(themeEvents);
|
||||
|
||||
Reference in New Issue
Block a user