From b001a2426149ac2f6a77d3bc215899928d6ecc19 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 8 Jul 2023 16:40:15 -0400 Subject: [PATCH] Adjust desktop/mobile categorizing --- index.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.mjs b/index.mjs index 5d101de..b799bea 100644 --- a/index.mjs +++ b/index.mjs @@ -6,8 +6,8 @@ const document = await request.text(); const $ = cheerio.load(document); -const desktopRegex = new RegExp('^Mozilla\\/5\\.0 \\((Windows|Linux|Macintosh).*$'); -const mobileRegex = new RegExp('^Mozilla\\/5\\.0 \\((iPhone|iPad|Android).*$'); +const desktopRegex = new RegExp('^Mozilla\\/5\\.0 \\((Windows NT 1|Macintosh|X11).*$'); +const mobileRegex = new RegExp('^Mozilla\\/5\\.0 \\((iPhone|iPad|Android|Linux; Android).*$'); const desktopUserAgents = []; const mobileUserAgents = [];