From 4aee99b61ae0c1178cc573bde4c6377ab0f78e09 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 19 Jul 2023 03:23:31 +0000 Subject: [PATCH] test... --- packages/frontend/package.json | 1 + packages/frontend/src/components/MkPagination.vue | 7 ++++++- pnpm-lock.yaml | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 90c0cca44..d9d5bdecb 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -68,6 +68,7 @@ "tsconfig-paths": "4.2.0", "twemoji-parser": "14.0.0", "typescript": "5.1.6", + "ua-parser-js": "2.0.0-alpha.2", "uuid": "9.0.0", "vanilla-tilt": "1.8.0", "vite": "4.4.4", diff --git a/packages/frontend/src/components/MkPagination.vue b/packages/frontend/src/components/MkPagination.vue index 8f5ae87e5..a554fc411 100644 --- a/packages/frontend/src/components/MkPagination.vue +++ b/packages/frontend/src/components/MkPagination.vue @@ -47,6 +47,7 @@ import MkButton from '@/components/MkButton.vue'; import { defaultStore } from '@/store'; import { MisskeyEntity } from '@/types/date-separated-list'; import { i18n } from '@/i18n'; +import { UAParser } from 'ua-parser-js'; const SECOND_FETCH_LIMIT = 30; const TOLERANCE = 6; @@ -92,6 +93,10 @@ function arrayToEntries(entities: MisskeyEntity[]): [string, MisskeyEntity][] { function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): MisskeyEntityMap { return new Map([...map, ...arrayToEntries(entities)]); } + +const ua = new UAParser(navigator.userAgent); +const isWebKit = ua.getEngine().name === 'WebKit'; +console.log('isWebKit', isWebKit);