aboutsummaryrefslogtreecommitdiffstats
path: root/lib/html_script_finder
diff options
context:
space:
mode:
Diffstat (limited to 'lib/html_script_finder')
-rw-r--r--lib/html_script_finder/web_labels/js_web_labels.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/html_script_finder/web_labels/js_web_labels.js b/lib/html_script_finder/web_labels/js_web_labels.js
index f811e35..510852b 100644
--- a/lib/html_script_finder/web_labels/js_web_labels.js
+++ b/lib/html_script_finder/web_labels/js_web_labels.js
@@ -174,6 +174,26 @@ WebLabelFinder.prototype.isLicenseFree = function(
var license;
var found = false;
+ // Check if we can look up this license by its identifier.
+ var identifier = lic.licenses[i]['licenseName'];
+ if (typeof identifier !== 'undefined' &&
+ typeof licenses[identifier] !== 'undefined'
+ ) {
+ console.debug('recognized by index', identifier);
+ // This license was recognized, and it was free. Add it
+ // to the array of license status, which we'll look at
+ // when we're done with this web label row.
+ licenseStatuses.push(true);
+
+ console.debug("about TO ADD TO XHR: ", lic.fileUrl);
+ this.listCheck[lic.fileUrl] = 0;
+ addToCache(lic, 0, jslicenseURL, callback);
+
+ // Break out of the loop cause we found a matching license.
+ found = true;
+ continue;
+ }
+
// For each license from the internal license definitions
for (license in licenses) {
if (found === true) {