From 8f32f0d7b2ba4ffbfe89c42c8af77cc8fb33f285 Mon Sep 17 00:00:00 2001 From: obfuscated-loop <107592590+obfuscated-loop@users.noreply.github.com> Date: Sun, 14 Jan 2024 10:55:59 +0000 Subject: [PATCH 1/3] Add `language` key to anonymous requests --- src/data/background.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/background.js b/src/data/background.js index 37025f19..9046e8f2 100644 --- a/src/data/background.js +++ b/src/data/background.js @@ -391,6 +391,7 @@ function reportWebsite(info, tab, anon, issueType, notes, callback) { notes, url: tab.url, browser: getBrowserAndVersion(), + language: navigator.language, extensionVersion: chrome.runtime.getManifest().version, }), }) From 078257b230cb62b7f4b0f9abb38156cbbea5c8e9 Mon Sep 17 00:00:00 2001 From: obfuscated-loop <107592590+obfuscated-loop@users.noreply.github.com> Date: Sun, 14 Jan 2024 12:53:07 +0000 Subject: [PATCH 2/3] Add fallback if `navigator.language` fails --- src/data/background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/background.js b/src/data/background.js index 9046e8f2..ff4ca9be 100644 --- a/src/data/background.js +++ b/src/data/background.js @@ -391,7 +391,7 @@ function reportWebsite(info, tab, anon, issueType, notes, callback) { notes, url: tab.url, browser: getBrowserAndVersion(), - language: navigator.language, + language: navigator.language || Intl.DateTimeFormat().resolvedOptions().locale, extensionVersion: chrome.runtime.getManifest().version, }), }) From 8017b8bbe4a3ffdc4e6a564c5efcf4bbe176c64b Mon Sep 17 00:00:00 2001 From: obfuscated-loop <107592590+obfuscated-loop@users.noreply.github.com> Date: Sun, 14 Jan 2024 12:55:54 +0000 Subject: [PATCH 3/3] Shut prettier up --- src/data/background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/background.js b/src/data/background.js index ff4ca9be..a2bfd27e 100644 --- a/src/data/background.js +++ b/src/data/background.js @@ -391,7 +391,8 @@ function reportWebsite(info, tab, anon, issueType, notes, callback) { notes, url: tab.url, browser: getBrowserAndVersion(), - language: navigator.language || Intl.DateTimeFormat().resolvedOptions().locale, + language: + navigator.language || Intl.DateTimeFormat().resolvedOptions().locale, extensionVersion: chrome.runtime.getManifest().version, }), })