From 73da91b91fa13dd85903f1675257c95614790950 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 20 Sep 2022 18:59:28 +1000 Subject: added some comments for various checks --- main_background.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main_background.js b/main_background.js index d33d3d9..73aa47b 100644 --- a/main_background.js +++ b/main_background.js @@ -618,6 +618,7 @@ function validateLicense(matches) { */ function license_read(scriptSrc, name, external = false) { + // Check for @licstart .. @licend method const license = legacy_license_lib.check(scriptSrc); if (license) { return [true, scriptSrc, `Licensed under: ${license}`]; @@ -653,6 +654,7 @@ function license_read(scriptSrc, name, external = false) { return trivial; } + // Check for @license .. @license-end method while (uneditedSrc) { const openingMatch = /\/[/*]\s*?(@license)\s+(\S+)\s+(\S+).*$/mi.exec(uneditedSrc); if (!openingMatch) { // no license found, check for triviality @@ -856,6 +858,7 @@ var ResponseHandler = { }); return ResponseProcessor.ACCEPT; } else { + // Check for the weblabel method let scriptInfo = await ExternalLicenses.check({ url: fullUrl, tabId, frameId, documentUrl }); if (scriptInfo) { let verdict, ret; -- cgit v1.2.3