diff options
author | Yuchen Pei <hi@ypei.me> | 2022-09-22 12:54:07 +1000 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-09-22 12:54:07 +1000 |
commit | af903283f05e628ca2e25dfb8e2745baee945b7f (patch) | |
tree | f7eb4df454bf61d4299cde47e05daaa9d95f3301 /bg | |
parent | d3d4a8675626671f728ba64a6f85ef07d377c521 (diff) |
clean up external license checking a bit
Diffstat (limited to 'bg')
-rw-r--r-- | bg/ExternalLicenses.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/bg/ExternalLicenses.js b/bg/ExternalLicenses.js index 1196602..01894b1 100644 --- a/bg/ExternalLicenses.js +++ b/bg/ExternalLicenses.js @@ -48,6 +48,7 @@ const ExternalLicenses = { cachedHrefs.delete(tabId); }, + // Checks external script using web labels async check(script) { const { url, tabId, frameId, documentUrl } = script; const tabCache = cachedHrefs.get(tabId); @@ -69,12 +70,6 @@ const ExternalLicenses = { licensesByLabel.get(uLabel.replace(/^GNU-|-(?:OR-LATER|ONLY)$/, '')); return license ? [license] : []; }).flat()); - scriptInfo.toString = () => { - const licenseIds = [...this.licenses].map(l => l.identifier).sort().join(', '); - return licenseIds - ? `Free license${this.licenses.size > 1 ? 's' : ''} (${licenseIds})` - : 'Unknown license(s)'; - } scriptInfo.free = scriptInfo.licenses.size > 0; return scriptInfo; }, |