Skip to content

Commit

Permalink
Replaced JS 1.7 array comprehension syntax
Browse files Browse the repository at this point in the history
Fixes #166.
  • Loading branch information
1ec5 committed Feb 4, 2016
1 parent 20972a6 commit 68801d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions content/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,13 @@ function disableOthers(doc) {
// Create a sandbox to execute the code in.
// dump("inner sandbox URL: " + doc.location.href + "\n"); // debug
let sandbox = new Sandbox(doc.defaultView);
let disabledScriptNames = [AVIMConfig.disabledScripts[name] && name
for (name in AVIMConfig.disabledScripts)];
let disabledScriptNames = [];
for (let name in AVIMConfig.disabledScripts) {
if (name && AVIMConfig.disabledScripts.propertyIsEnumerable(name) &&
AVIMConfig.disabledScripts[name]) {
disabledScriptNames.push(name);
}
}
sandbox.createObjectAlias("disabledScripts",
quoteJS(disabledScriptNames.join("|")));
sandbox.injectScript("chrome://avim/content/disabler.js");
Expand Down
2 changes: 1 addition & 1 deletion content/sciMoz.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ context.lazyHandlers.sciMoz = function (evt) {
let win = evt.originalTarget.ownerDocument.defaultView;
let elt = win.ko.views.manager.currentView.scimoz || evt.originalTarget;
// dump("AVIM.handleSciMoz -- target: " + elt + "; type: " + elt.type + "; code: " + evt.which + "\n"); // debug
// dump("xul:scintilla:\n" + [prop for (prop in elt)] + "\n"); // debug
// dump("xul:scintilla:\n" + Object.keys(elt) + "\n"); // debug
// elt.setSelectionNStart(0, 8); // debug
// dump(">>> scimoz.getSelectionNStart: " + elt.selections ? elt.getSelectionNStart(0) : "" + "\n"); // debug

Expand Down

0 comments on commit 68801d5

Please sign in to comment.