From dbc465114186500a440b5afa9548937db26b5ef8 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Sun, 1 Jun 2025 10:57:53 +0800 Subject: [PATCH] chore: parse webkit version on linux (#1299) --- apps/readest-app/src/utils/ua.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/readest-app/src/utils/ua.ts b/apps/readest-app/src/utils/ua.ts index 07b4b399..8918ec7c 100644 --- a/apps/readest-app/src/utils/ua.ts +++ b/apps/readest-app/src/utils/ua.ts @@ -21,7 +21,7 @@ export const parseWebViewVersion = (appService: AppService | null): string => { return match ? `Edge ${match[1]}` : 'Edge WebView2'; } else if (appService?.appPlatform === 'tauri' && appService?.osPlatform === 'linux') { // Linux WebView - const match = ua.match(/Chromium\/([0-9.]+)/); + const match = ua.match(/AppleWebKit\/([0-9.]+)/); return match ? `WebView ${match[1]}` : 'Linux WebView'; } else if (ua.includes('CriOS') && ua.includes('Mobile/') && ua.includes('Safari')) { // iOS Chrome WebView