summaryrefslogtreecommitdiff
path: root/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2015-10-10 11:26:00 -0500
committerRuben Rodriguez <ruben@gnu.org>2015-10-12 23:20:55 -0500
commitee08985f3bbf56ad8fda61c7370b6b37e1bbbe16 (patch)
tree6c97e35b8c20e80967a5a7c856e6f0237d8755bf /data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder
parent02da35db344679e666459b1e84946c7c9e5ba464 (diff)
LibreJS updated to 6.0.10.20150620
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder')
-rw-r--r--data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/js_web_labels.js25
1 files changed, 22 insertions, 3 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/js_web_labels.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/js_web_labels.js
index ab363d9..510852b 100644
--- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/js_web_labels.js
+++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/js_web_labels.js
@@ -124,7 +124,8 @@ WebLabelFinder.prototype.formatURL = function(link) {
WebLabelFinder.prototype.fetchLicensePage = function() {
var that = this;
try {
- var req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
+ var req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
+ .createInstance();
req.onload = function() {
console.debug("Fetching License!");
@@ -173,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) {
@@ -262,8 +283,6 @@ WebLabelFinder.prototype.matchListWithDefs = function(jslicenseURL) {
}
}, 15000);
-
-
for (var i = 0; i < this.licenseList.length; i++) {
// this.licenseList[i] is the web labels license column
var lic = this.licenseList[i];