diff options
author | Nik Nyby <nikolas@gnu.org> | 2015-06-27 10:07:42 -0400 |
---|---|---|
committer | Nik Nyby <nikolas@gnu.org> | 2015-10-22 21:34:56 -0400 |
commit | 0f68d98dd281f1105043433da18fa9201b4cf971 (patch) | |
tree | 7abb1813716234e1077c98221c338dc2f824d6f5 | |
parent | 16903513a8ea4241cfe084ab9a07fe2285a2f525 (diff) | |
download | librejsxul-0f68d98dd281f1105043433da18fa9201b4cf971.tar.lz librejsxul-0f68d98dd281f1105043433da18fa9201b4cf971.tar.xz librejsxul-0f68d98dd281f1105043433da18fa9201b4cf971.zip |
Fixes for jpm
-rw-r--r-- | install.rdf | 2 | ||||
-rw-r--r-- | lib/js_checker/js_checker.js | 2 | ||||
-rw-r--r-- | lib/js_load_observer/js_load_observer.js | 2 | ||||
-rw-r--r-- | lib/script_entries/scripts_cache.js | 3 | ||||
-rw-r--r-- | lib/settings/storage.js | 4 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | test/mock/mock_nodes.js | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/install.rdf b/install.rdf index c34883b..2c8c9ff 100644 --- a/install.rdf +++ b/install.rdf @@ -10,7 +10,7 @@ <em:description>GNU LibreJS is an add-on for Mozilla-based browsers (IceCat, Firefox, Abrowser, Iceweasel) that prevents the execution of nonfree nontrivial JavaScript as described in "The Javascript Trap": http://www.gnu.org/philosophy/javascript-trap.html</em:description> <em:creator>Loic J. Duros</em:creator> - <em:iconURL>data/widget/images/librejs-32.png</em:iconURL> + <em:iconURL>data/widget/images/librejs-64.png</em:iconURL> <em:homepageURL>https://gnu.org/software/librejs/</em:homepageURL> <em:optionsURL>data:text/xml,<placeholder/></em:optionsURL> <em:optionsType>2</em:optionsType> diff --git a/lib/js_checker/js_checker.js b/lib/js_checker/js_checker.js index 4a3dfb9..ecf0826 100644 --- a/lib/js_checker/js_checker.js +++ b/lib/js_checker/js_checker.js @@ -173,7 +173,7 @@ JsChecker.prototype.searchJs = function(jsCode, resultReady, url) { this.resultReady = resultReady; this.jsCode = jsCode; this.shortText = jsCode.replace(bugfix, '').substring(0,100); - this.notification = require("ui/notification") + this.notification = require("../ui/notification") .createNotification(this.shortText).notification; var verbatimCode = this.jsCode.replace(bugfix, ''); diff --git a/lib/js_load_observer/js_load_observer.js b/lib/js_load_observer/js_load_observer.js index a9a6efa..525f58f 100644 --- a/lib/js_load_observer/js_load_observer.js +++ b/lib/js_load_observer/js_load_observer.js @@ -53,7 +53,7 @@ ScriptAnalyzer.prototype.analyzeScriptBeforeExec = function (e) { var script = e.target, isAccepted; var text = script.src ? script.src : script.textContent.substring(0,100); - var notif = require("ui/notification") + var notif = require("../ui/notification") .createNotification(text).notification; this.pageURL = urlHandler.removeFragment(script.ownerDocument.URL); if (!allowedRef.urlInAllowedReferrers(this.pageURL)) { diff --git a/lib/script_entries/scripts_cache.js b/lib/script_entries/scripts_cache.js index a09f94e..52ae33f 100644 --- a/lib/script_entries/scripts_cache.js +++ b/lib/script_entries/scripts_cache.js @@ -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); }; diff --git a/lib/settings/storage.js b/lib/settings/storage.js index 38d231d..b3645dd 100644 --- a/lib/settings/storage.js +++ b/lib/settings/storage.js @@ -23,8 +23,8 @@ const { Cc, Ci, Cu, components } = require("chrome"); -var { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm"); -var { FileUtils } = Cu.import("resource://gre/modules/FileUtils.jsm"); +const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm"); +const { FileUtils } = Cu.import("resource://gre/modules/FileUtils.jsm"); var relationChecker = require("../js_checker/relation_checker") .relationChecker; var rc = relationChecker(); // a dummy object for legacy module. diff --git a/package.json b/package.json index cb34bab..139029f 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,7 @@ "id": "jid1-KtlZuoiikVfFew@jetpack", "description": "GNU LibreJS is an add-on for Mozilla-based browsers (IceCat, Firefox, Abrowser, Iceweasel)\n that prevents the execution of nonfree nontrivial JavaScript as described in \"The Javascript Trap\": http://www.gnu.org/philosophy/javascript-trap.html", "main": "lib/main.js", - "icon": "data/widget/images/librejs-32.png", - "icon64": "data/widget/images/librejs-64.png", + "icon": "data/widget/images/librejs-64.png", "dependencies": { "menuitem": "0.0.4", "notification-box": "0.1.1" diff --git a/test/mock/mock_nodes.js b/test/mock/mock_nodes.js index 3ef1fbc..abd29a4 100644 --- a/test/mock/mock_nodes.js +++ b/test/mock/mock_nodes.js @@ -19,7 +19,7 @@ * along with GNU LibreJS. If not, see <http://www.gnu.org/licenses/>. */ -const types = require("js_checker/constant_types").token; +const types = require("../../lib/js_checker/constant_types").token; exports.mockNodes = { |