diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2015-10-10 11:26:00 -0500 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2015-10-12 23:20:55 -0500 |
commit | ee08985f3bbf56ad8fda61c7370b6b37e1bbbe16 (patch) | |
tree | 6c97e35b8c20e80967a5a7c856e6f0237d8755bf /data/extensions | |
parent | 02da35db344679e666459b1e84946c7c9e5ba464 (diff) |
LibreJS updated to 6.0.10.20150620
Diffstat (limited to 'data/extensions')
9 files changed, 131 insertions, 107 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/harness-options.json b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/harness-options.json index 1962584..fc6f7c0 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/harness-options.json +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/harness-options.json @@ -175,7 +175,7 @@ }, "librejs/html_script_finder/web_labels/js_web_labels": { "docsSHA256": null, - "jsSHA256": "b9d202e43ee6e0882f19a14e6a21ab4e816769b553f079540cde4c9204670228", + "jsSHA256": "97c3f8b0ed2695db5298a40c38cc14ae670dd3e0a571f1560477905472173d11", "moduleName": "html_script_finder/web_labels/js_web_labels", "packageName": "librejs", "requirements": { @@ -291,7 +291,7 @@ }, "librejs/js_checker/js_checker": { "docsSHA256": null, - "jsSHA256": "cfdc61f93a49072fcccc542746520fb9d48feb4b6768262af12d3622a0871e9f", + "jsSHA256": "5aefeae7e553157314165bd28998b852dc7c8387153d582f05b453a4b567228c", "moduleName": "js_checker/js_checker", "packageName": "librejs", "requirements": { @@ -311,7 +311,7 @@ }, "librejs/js_checker/license_definitions": { "docsSHA256": null, - "jsSHA256": "801bf3c6435824d0746d888c6833819bb6a8b36ba2d38c2235825c99f43e86f7", + "jsSHA256": "e59b0a4595a3143ae40dcde99c64cb1b403994411aa1836f0838064a2ed99974", "moduleName": "js_checker/license_definitions", "packageName": "librejs", "requirements": {}, @@ -450,7 +450,7 @@ }, "librejs/script_entries/free_libraries": { "docsSHA256": null, - "jsSHA256": "c9bf7ad7a2492324b98f32bff69147d59c019fcf71c18f9cc37851a94ad468a3", + "jsSHA256": "07ec51813e419fceda598ca6e279b71fefea60166dc9a9c966bb869b501eaf43", "moduleName": "script_entries/free_libraries", "packageName": "librejs", "requirements": { @@ -474,7 +474,7 @@ }, "librejs/script_entries/scripts_cache": { "docsSHA256": null, - "jsSHA256": "7c03ea3f3926e4c802b6b14aa01fa9d78be25326b06f3e228915b70f4416d5e3", + "jsSHA256": "030b71b0336647a67fe07ddc185a38f240e5d017e1d5f3e16b3bfd19f3ef6e3a", "moduleName": "script_entries/scripts_cache", "packageName": "librejs", "requirements": { @@ -679,7 +679,7 @@ "private-browsing": true, "unsafe-content-script": true }, - "version": "6.0.9" + "version": "6.0.10.20150620" }, "menuitems": { "author": "Erik Vold (http://erikvold.com/) <erikvvold@gmail.com>", diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/install.rdf b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/install.rdf index a4a7d01..ed51c28 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/install.rdf +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/install.rdf @@ -3,7 +3,7 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --><RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <em:id>jid1-KtlZuoiikVfFew@jetpack</em:id> - <em:version>6.0.9</em:version> + <em:version>6.0.10.20150620</em:version> <em:type>2</em:type> <em:bootstrap>true</em:bootstrap> <em:unpack>false</em:unpack> @@ -26,6 +26,7 @@ </Description> </em:targetApplication> + <!-- Front End MetaData --> <em:name>GNU LibreJS</em:name> <em:description>GNU LibreJS is an add-on for Mozilla-based browsers (IceCat, Firefox, Abrowser, Iceweasel) diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/display-panel.html b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/display-panel.html index 89200be..4b7f8b5 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/display-panel.html +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/display_panel/content/display-panel.html @@ -29,16 +29,22 @@ <body> <div class="title-area"> - <a class="libre" - id="ljs-settings" - href="javascript:void" - title="LibreJS Whitelist Settings"> - <h1 class="libre">LibreJS</h1> - </a> - <a target="_blank" href="https://www.gnu.org/software/librejs/" + <div> + <a class="libre" + id="ljs-settings" + href="javascript:void" + title="LibreJS Whitelist Settings"> + <h1 class="libre">LibreJS</h1> + </a> + </div> + <div> + <a target="_blank" href="https://www.gnu.org/software/librejs/" id="librejs-web-link" - >gnu.org/software/librejs</a> - <strong>LibreJS 6.0.9</strong> + >gnu.org/software/librejs</a> + </div> + <div> + <strong>LibreJS 6.0.10.20150620</strong> + </div> </div> <div id="info"> diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/styles/styles.css b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/styles/styles.css index abf6977..2e1a88a 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/styles/styles.css +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/data/settings/styles/styles.css @@ -1,6 +1,5 @@ body { - font-size:67.5%; - background:#CCC; + background: #ccc; } #site-header { 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]; diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/js_checker.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/js_checker.js index da3ebe6..21bfeaf 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/js_checker.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/js_checker.js @@ -161,6 +161,7 @@ JsChecker.prototype.isFreeLicensed = function(script) { * Takes in some javascript code (as string). * Uses Narcissus parser to build an abstract syntax tree. * Checks for trivialness. + * */ JsChecker.prototype.searchJs = function(jsCode, resultReady, url) { var that = this; @@ -203,39 +204,20 @@ JsChecker.prototype.searchJs = function(jsCode, resultReady, url) { this.freeToken = types.emptyTypeObj(); this.nontrivialness = types.emptyTypeObj(); - if (typeof url === 'undefined' || url === null) { - // use this.hash to keep track of comments made by the nontrivial - // checker code about why/how the code is found to be nontrivial. - this.nonTrivialChecker = - nonTrivialModule.nonTrivialChecker(this.hash); - - // register callback and hash. So that result - // can be passed. - setHashCallback( - this.hash, this.handleTree.bind(this), this.notification); - - // parse using ChromeWorker. - console.debug( - 'JsChecker.searchJs(): starting narcissusWorker.parse()'); - narcissusWorker.parse(this.jsCode, this.hash); - } else { - // Handle external scripts - console.debug('Analyzing external script: ' + url); - this.parseTree = {}; - if (this.isFreeLicensed(this.jsCode)) { - this.parseTree.freeTrivialCheck = type.trivialWithComment( - 'This script is under free software licenses: ' + url); - } else { - this.parseTree.freeTrivialCheck = type.nontrivialWithComment( - 'This external script is not under free software ' + - 'licenses: ' + url); - } + // use this.hash to keep track of comments made by the nontrivial + // checker code about why/how the code is found to be nontrivial. + this.nonTrivialChecker = + nonTrivialModule.nonTrivialChecker(this.hash); - // Cache result with hash of script for future checks - scriptsCached.addEntry( - this.jsCode, this.parseTree.freeTrivialCheck, - this.relationChecker, true, this.url); - } + // register callback and hash. So that result + // can be passed. + setHashCallback( + this.hash, this.handleTree.bind(this), this.notification); + + // parse using ChromeWorker. + console.debug( + 'JsChecker.searchJs(): starting narcissusWorker.parse()'); + narcissusWorker.parse(this.jsCode, this.hash); } catch (x) { console.debug('error', x); this.handleTree(false, x); diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/license_definitions.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/license_definitions.js index d5fcd83..cf07268 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/license_definitions.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/js_checker/license_definitions.js @@ -30,89 +30,95 @@ var type = exports.types; /** * List of all the licenses. * Currently only short substrings are used with regex. + * + * The licenses are indexed by their "Identifier", which, when possible, + * corresponds to their identifier as specified by SPDX here: + * https://spdx.org/licenses/ */ exports.licenses = { - CC0: { + 'CC0-1.0': { licenseName: 'Creative Commons CC0 1.0 Universal', + identifier: 'CC0-1.0', canonicalUrl: [ 'http://creativecommons.org/publicdomain/zero/1.0/legalcode', 'magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt' ], - identifier: 'CC0-1.0', licenseFragments: [] }, - gplv2: { + 'GPL-2.0': { licenseName: 'GNU General Public License (GPL) version 2', + identifier: 'GPL-2.0', canonicalUrl: [ 'http://www.gnu.org/licenses/gpl-2.0.html', 'magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt' ], - identifier: 'GNU-GPL-2.0', licenseFragments: [{text: "<THISPROGRAM> is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.", type: type.SHORT}, {text:"Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the \"GPL\"), or the GNU Lesser General Public License Version 2.1 or later (the \"LGPL\"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.", type: type.SHORT}] }, - gplv3: { + 'GPL-3.0': { licenseName: 'GNU General Public License (GPL) version 3', + identifier: 'GPL-3.0', canonicalUrl: [ 'http://www.gnu.org/licenses/gpl-3.0.html', 'magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt' ], - identifier: 'GNU-GPL-3.0', licenseFragments: [ {text: "The JavaScript code in this page is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (GNU GPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The code is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. As additional permission under GNU GPL version 3 section 7, you may distribute non-source (e.g., minimized or compacted) forms of that code without the copy of the GNU GPL normally required by section 4, provided you include this license notice and a URL through which recipients can access the Corresponding Source.", type: type.SHORT}, {text: "<THISPROGRAM> is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.", type: type.SHORT}] }, - gnuAllPermissive: { + 'GNU-All-Permissive': { licenseName: 'GNU All-Permissive License', licenseFragments: [{text: "Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.", type: type.SHORT}] }, - apache_2License: { + 'Apache-2.0': { licenseName: 'Apache License, Version 2.0', + identifier: 'Apache-2.0', canonicalUrl: [ 'http://www.apache.org/licenses/LICENSE-2.0', 'magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt' ], - identifier: 'Apache-2.0', licenseFragments: [{text: "Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0", type: type.SHORT}] }, - lgpl21: { + 'LGPL-2.1': { licenseName: 'GNU Lesser General Public License, version 2.1', + identifier: 'LGPL-2.1', canonicalUrl: [ 'http://www.gnu.org/licenses/lgpl-2.1.html', 'magnet:?xt=urn:btih:5de60da917303dbfad4f93fb1b985ced5a89eac2&dn=lgpl-2.1.txt' ], - identifier: 'GNU-LGPL-2.1', licenseFragments: [{text: "<THISLIBRARY> is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.", type: type.SHORT}] }, - lgplv3: { + 'LGPL-3.0': { licenseName: 'GNU Lesser General Public License, version 3', + identifier: 'LGPL-3.0', canonicalUrl: [ 'http://www.gnu.org/licenses/lgpl-3.0.html', 'magnet:?xt=urn:btih:0ef1b8170b3b615170ff270def6427c317705f85&dn=lgpl-3.0.txt' ], - identifier: 'GNU-LGPL-3.0', licenseFragments: [{text: "<THISPROGRAM> is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.", type: type.SHORT}] }, - agplv3: { + 'AGPL-3.0': { licenseName: 'GNU AFFERO GENERAL PUBLIC LICENSE version 3', + identifier: 'AGPL-3.0', canonicalUrl: [ 'http://www.gnu.org/licenses/agpl-3.0.html', 'magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt' ], - identifier: 'GNU-AGPL-3.0', + licenseFragments: [{text: "<THISPROGRAM> is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.", type: type.SHORT}] }, - boostSoftware: { - licenseName: 'Boost Software License', + 'BSL-1.0': { + licenseName: 'Boost Software License 1.0', + identifier: 'BSL-1.0', canonicalUrl: [ 'http://www.boost.org/LICENSE_1_0.txt', 'magnet:?xt=urn:btih:89a97c535628232f2f3888c2b7b8ffd4c078cec0&dn=Boost-1.0.txt' @@ -120,8 +126,9 @@ exports.licenses = { licenseFragments: [{text: "Boost Software License <VERSION> <DATE> Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the \"Software\") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following", type: type.SHORT}] }, - bsd3: { + 'BSD-3-Clause': { licenseName: "BSD 3-Clause License", + identifier: 'BSD-3-Clause', canonicalUrl: [ 'http://opensource.org/licenses/BSD-3-Clause', 'magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt' @@ -129,27 +136,28 @@ exports.licenses = { licenseFragments: [{text: "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.", type: type.SHORT}] }, - bsd2: { + 'BSD-2-Clause': { licenseName: "BSD 2-Clause License", + identifier: 'BSD-2-Clause', licenseFragments: [{text: "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.", type: type.SHORT}] }, - epl_1_0: { - licenseName: "Eclipse Public License Version 1.0", - identifier: "EPL-1.0", - canonicalUrl: [ - "http://www.eclipse.org/legal/epl-v10.html", - "magnet:?xt=urn:btih:4c6a2ad0018cd461e9b0fc44e1b340d2c1828b22&dn=epl-1.0.txt" - ], - licenseFragments: [ - { - text: "THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.", - type: type.SHORT - } - ] + 'EPL-1.0': { + licenseName: "Eclipse Public License Version 1.0", + identifier: "EPL-1.0", + canonicalUrl: [ + "http://www.eclipse.org/legal/epl-v10.html", + "magnet:?xt=urn:btih:4c6a2ad0018cd461e9b0fc44e1b340d2c1828b22&dn=epl-1.0.txt" + ], + licenseFragments: [ + { + text: "THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.", + type: type.SHORT + } + ] }, - mozillaPublicLicense_2_0: { + 'MPL-2.0': { licenseName: 'Mozilla Public License Version 2.0', identifier: 'MPL-2.0', canonicalUrl: [ @@ -159,7 +167,7 @@ exports.licenses = { licenseFragments: [{text: "This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.", type: type.SHORT }] }, - expat: { + 'Expat': { licenseName: 'Expat License (sometimes called MIT Licensed)', identifier: 'Expat', canonicalUrl: [ @@ -169,17 +177,18 @@ exports.licenses = { licenseFragments: [{text: "Copyright <YEAR> <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", type: type.SHORT}] }, - X11: { + 'X11': { licenseName: 'X11 License', + identifier: 'X11', canonicalUrl: [ 'magnet:?xt=urn:btih:5305d91886084f776adcf57509a648432709a7c7&dn=x11.txt' ], licenseFragments: [{text: "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", type: type.SHORT}] }, - XFree86: { - licenseName: "XFree86 License", - identifier: 'Modified-BSD', + 'XFree86-1.1': { + licenseName: "XFree86 1.1 License", + identifier: 'XFree86-1.1', canonicalUrl: [ 'http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3', 'http://www.xfree86.org/current/LICENSE4.html', @@ -189,8 +198,9 @@ exports.licenses = { ] }, - FreeBSD: { + 'FreeBSD': { licenseName: "FreeBSD License", + identifier: 'FreeBSD', canonicalUrl: [ 'http://www.freebsd.org/copyright/freebsd-license.html', 'magnet:?xt=urn:btih:87f119ba0b429ba17a44b4bffcab33165ebdacc0&dn=freebsd.txt' @@ -198,8 +208,9 @@ exports.licenses = { licenseFragments: [{text: "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.", type: type.SHORT}] }, - ISC: { + 'ISC': { licenseName: "The ISC License", + identifier: 'ISC', canonicalUrl: [ 'https://www.isc.org/downloads/software-support-policy/isc-license/', 'magnet:?xt=urn:btih:b8999bbaf509c08d127678643c515b9ab0836bae&dn=ISC.txt' @@ -208,13 +219,17 @@ exports.licenses = { {text: "Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.", type: type.SHORT}] }, - jQueryTools: { + 'jQueryTools': { licenseName: "jQuery Tools", - licenseFragments: [{text: 'NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.', type: type.SHORT}] + licenseFragments: [{ + text: 'NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.', + type: type.SHORT + }] }, - ArtisticLicense2: { + 'Artistic-2.0': { licenseName: "Artistic License 2.0", + identifier: 'Artistic-2.0', canonicalUrl: [ "http://www.perlfoundation.org/artistic_license_2_0", "magnet:?xt=urn:btih:54fd2283f9dbdf29466d2df1a98bf8f65cafe314&dn=artistic-2.0.txt" @@ -222,7 +237,7 @@ exports.licenses = { licenseFragments: [] }, - PublicDomain: { + 'PublicDomain': { licenseName: "Public Domain", canonicalUrl: [ 'magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt' @@ -230,13 +245,13 @@ exports.licenses = { licenseFragments: [] }, - CPALv1: { + 'CPAL-1.0': { licenseName: 'Common Public Attribution License Version 1.0 (CPAL)', + identifier: 'CPAL-1.0', canonicalUrl: [ 'http://opensource.org/licenses/cpal_1.0', 'magnet:?xt=urn:btih:84143bc45939fc8fa42921d619a95462c2031c5c&dn=cpal-1.0.txt' ], - identifier: 'CPAL-1.0', licenseFragments: [ { text: 'The contents of this file are subject to the Common Public Attribution License Version 1.0', @@ -248,13 +263,13 @@ exports.licenses = { } ] }, - WTFPL: { + 'WTFPL': { licenseName: 'Do What The F*ck You Want To Public License (WTFPL)', + identifier: 'WTFPL', canonicalUrl: [ 'http://www.wtfpl.net/txt/copying/', 'magnet:?xt=urn:btih:723febf9f6185544f57f0660a41489c7d6b4931b&dn=wtfpl.txt' ], - identifier: 'WTFPL', licenseFragments: [ { text: 'DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE', diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/free_libraries.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/free_libraries.js index f3354f6..8821d04 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/free_libraries.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/free_libraries.js @@ -40,6 +40,7 @@ var freeLibraries = JSON.parse(dbContents); /* a database of the free libraries */ var init = function () { + // relationChecker, which roughly checks if variables are window // variables or not, is useless in this case. Use the same // object for all entries. diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/scripts_cache.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/scripts_cache.js index dfc5e6a..47ab069 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/scripts_cache.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/script_entries/scripts_cache.js @@ -19,7 +19,11 @@ * You should have received a copy of the GNU General Public License * along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>. */ -var relationChecker = require("js_checker/relation_checker").relationChecker; +var relationCheckerObj = require("js_checker/relation_checker") + .relationChecker; + +// import free_libraries to populate the cache hash map. +var free_libraries = require("script_entries/free_libraries"); var crypto = require('script_entries/crypto'); const checkTypes = require("js_checker/constant_types").checkTypes; @@ -48,8 +52,6 @@ ScriptsCached.prototype.getHash = function(scriptText) { */ ScriptsCached.prototype.resetCache = function () { cachedResults = {}; - // import free_libraries to populate the cache hash map. - var free_libraries = require("script_entries/free_libraries"); free_libraries.init(); }; @@ -62,12 +64,11 @@ ScriptsCached.prototype.resetCache = function () { * */ ScriptsCached.prototype.addEntry = function( - scriptText, result, relationCheckerObj, allowTrivial, url -) { + scriptText, result, relationChecker, allowTrivial, url) { console.debug("result addEntry is", JSON.stringify(result)); cachedResults[this.getHash(scriptText)] = { 'result': result, - 'relationChecker': relationChecker(), + 'relationChecker': relationCheckerObj(), 'allowTrivial': allowTrivial, 'url': url }; |