From dd6f6c997480dab86d7b7f385d2703540388fd63 Mon Sep 17 00:00:00 2001 From: wanhose Date: Wed, 10 Nov 2021 11:40:26 +0100 Subject: [PATCH] feat(scripts): improve reports --- scripts/background.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/background.js b/scripts/background.js index 52c4efc..07149c6 100644 --- a/scripts/background.js +++ b/scripts/background.js @@ -178,11 +178,13 @@ const getTab = (callback) => { const report = () => { chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { const tab = tabs[0]; + const userAgent = window.navigator.userAgent; + const version = chrome.runtime.getManifest().version; if (tab) { fetch("https://cdm-report-service.herokuapp.com/rest/v1/report/", { body: JSON.stringify({ - text: tab.url, + text: `There's a problem with ${tab.url} using ${userAgent} in CDM ${version}`, to: "wanhose.development@gmail.com", subject: "Cookie Dialog Monster Report", }),