aboutsummaryrefslogtreecommitdiff
path: root/main_background.js
diff options
context:
space:
mode:
Diffstat (limited to 'main_background.js')
-rw-r--r--main_background.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/main_background.js b/main_background.js
index 4f164f4..c9ed6f2 100644
--- a/main_background.js
+++ b/main_background.js
@@ -858,7 +858,10 @@ var ResponseHandler = {
const scriptInfo = await ExternalLicenses.check({ url: fullUrl, tabId, frameId, documentUrl });
if (scriptInfo) {
const [verdict, ret] = scriptInfo.free ? ['accepted', ResponseProcessor.ACCEPT] : ['blocked', ResponseProcessor.REJECT];
- const msg = scriptInfo.toString();
+ const licenseIds = [...scriptInfo.licenses].map(l => l.identifier).sort().join(', ');
+ const msg = licenseIds
+ ? `Free license${scriptInfo.licenses.size > 1 ? 's' : ''} (${licenseIds})`
+ : 'Unknown license(s)';
addReportEntry(tabId, { url, [verdict]: [url, msg] });
return ret;
}