aboutsummaryrefslogtreecommitdiffstats
path: root/lib/script_entries
diff options
context:
space:
mode:
Diffstat (limited to 'lib/script_entries')
-rw-r--r--lib/script_entries/accepted_scripts.js2
-rw-r--r--lib/script_entries/all_scripts.js2
-rw-r--r--lib/script_entries/dryrun_scripts.js4
-rw-r--r--lib/script_entries/free_libraries.js10
-rw-r--r--lib/script_entries/removed_scripts.js4
-rw-r--r--lib/script_entries/scripts_cache.js11
6 files changed, 18 insertions, 15 deletions
diff --git a/lib/script_entries/accepted_scripts.js b/lib/script_entries/accepted_scripts.js
index c732f31..bac11f0 100644
--- a/lib/script_entries/accepted_scripts.js
+++ b/lib/script_entries/accepted_scripts.js
@@ -20,7 +20,7 @@
* along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>.
*/
-var allScripts = require('script_entries/all_scripts').allScripts;
+var allScripts = require('./all_scripts').allScripts;
var AcceptedScripts = function() {
this.scripts = {};
diff --git a/lib/script_entries/all_scripts.js b/lib/script_entries/all_scripts.js
index 2028864..c27a410 100644
--- a/lib/script_entries/all_scripts.js
+++ b/lib/script_entries/all_scripts.js
@@ -20,7 +20,7 @@
* along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>.
*/
-var crypto = require('script_entries/crypto');
+var crypto = require('./crypto');
var AllScripts = function() {
this.scripts = {};
diff --git a/lib/script_entries/dryrun_scripts.js b/lib/script_entries/dryrun_scripts.js
index 87ec482..a15b0b2 100644
--- a/lib/script_entries/dryrun_scripts.js
+++ b/lib/script_entries/dryrun_scripts.js
@@ -20,8 +20,8 @@
* along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>.
*/
-var allScripts = require('script_entries/all_scripts').allScripts;
-const urlHandler = require('url_handler/url_handler');
+var allScripts = require('./all_scripts').allScripts;
+const urlHandler = require('../url_handler/url_handler');
exports.dryRunScripts = {
scripts: {},
diff --git a/lib/script_entries/free_libraries.js b/lib/script_entries/free_libraries.js
index 8821d04..291b982 100644
--- a/lib/script_entries/free_libraries.js
+++ b/lib/script_entries/free_libraries.js
@@ -22,13 +22,15 @@
// THIS MODULE IS DEPRECATED IN FAVOR OF THE NEW WHITELISTING MODULE (LibreJS 6.0)
-var relationChecker = require("js_checker/relation_checker").relationChecker;
-var checkTypes = require("js_checker/constant_types").checkTypes;
-var scriptsCached = require("script_entries/scripts_cache").scriptsCached;
+var relationChecker = require("../js_checker/relation_checker")
+ .relationChecker;
+var checkTypes = require("../js_checker/constant_types").checkTypes;
+var scriptsCached = require("./scripts_cache").scriptsCached;
// find the json database path.
-var dbContents = require("sdk/self").data.load("script_libraries/script-libraries.json");
+var dbContents = require("sdk/self").data.load(
+ "script_libraries/script-libraries.json");
const AUTHOR_REASON = "This script has been tagged as free software by LibreJS authors.";
diff --git a/lib/script_entries/removed_scripts.js b/lib/script_entries/removed_scripts.js
index b7544e9..2a3b1d3 100644
--- a/lib/script_entries/removed_scripts.js
+++ b/lib/script_entries/removed_scripts.js
@@ -20,8 +20,8 @@
* along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>.
*/
-var allScripts = require('script_entries/all_scripts').allScripts;
-const urlHandler = require('url_handler/url_handler');
+var allScripts = require('./all_scripts').allScripts;
+const urlHandler = require('../url_handler/url_handler');
var RemovedScripts = function() {
this.scripts = {};
diff --git a/lib/script_entries/scripts_cache.js b/lib/script_entries/scripts_cache.js
index 47ab069..52ae33f 100644
--- a/lib/script_entries/scripts_cache.js
+++ b/lib/script_entries/scripts_cache.js
@@ -19,14 +19,14 @@
* 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 relationCheckerObj = require("js_checker/relation_checker")
+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 free_libraries = require("../script_entries/free_libraries");
-var crypto = require('script_entries/crypto');
-const checkTypes = require("js_checker/constant_types").checkTypes;
+var crypto = require('./crypto');
+const checkTypes = require("../js_checker/constant_types").checkTypes;
// cachedResults contains objects with result/relationChecker for
// scripts entries indexed by SHA1sum
@@ -40,7 +40,8 @@ var ScriptsCached = function() {
};
ScriptsCached.prototype.getHash = function(scriptText) {
- require('ui/notification').createNotification(scriptText.substring(0,100));
+ require('../ui/notification').createNotification(
+ scriptText.substring(0,100));
return crypto.sha1Encrypt(scriptText);
};