diff --git a/common/content/autocommands.js b/common/content/autocommands.js index 7451689a..9f2ba39f 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -275,11 +275,11 @@ var AutoCommands = Module("autocommands", { }, completion: function initCompletion() { completion.autocmdEvent = function autocmdEvent(context) { - context.completions = Iterator(config.autocommands); + context.completions = iter(config.autocommands); }; }, javascript: function initJavascript() { - JavaScript.setCompleter(AutoCmdHive.prototype.get, [() => Iterator(config.autocommands)]); + JavaScript.setCompleter(AutoCmdHive.prototype.get, [() => iter(config.autocommands)]); }, options: function initOptions() { options.add(["eventignore", "ei"], diff --git a/common/content/dactyl.js b/common/content/dactyl.js index ab87a01c..73fdf55a 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1339,8 +1339,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { opts: update({ s: ["Status bar", [statusline.statusBar.id]] }, config.guioptions), + setter: function (opts) { - for (let [opt, [, ids]] in Iterator(this.opts)) { + for (let [opt, [, ids]] of iter(this.opts)) { ids.map(id => document.getElementById(id)) .forEach(function (elem) { if (elem) diff --git a/common/content/marks.js b/common/content/marks.js index 2d87bb50..9afd717a 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -278,7 +278,7 @@ var Marks = Module("marks", { _onPageLoad: function _onPageLoad(event) { let win = event.originalTarget.defaultView; - for (let [i, mark] in Iterator(this._pendingJumps)) { + for (let [i, mark] of this._pendingJumps.entries()) { if (win && win.location.href == mark.location) { this._scrollTo(mark); this._pendingJumps.splice(i, 1); diff --git a/common/content/quickmarks.js b/common/content/quickmarks.js index 9073b994..da09b2ee 100644 --- a/common/content/quickmarks.js +++ b/common/content/quickmarks.js @@ -178,7 +178,7 @@ var QuickMarks = Module("quickmarks", { completion: function initCompletion() { completion.quickmark = function (context) { context.title = ["QuickMark", "URL"]; - context.generate = () => Iterator(quickmarks._qmarks); + context.generate = () => iter(quickmarks._qmarks); }; }, mappings: function initMappings() { diff --git a/common/content/tabs.js b/common/content/tabs.js index f91564e6..a13479eb 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -999,7 +999,7 @@ var Tabs = Module("tabs", { context.keys = { text: function ([i, { state: s }]) (i + 1) + ": " + s.entries[s.index - 1].url, description: "[1].title", icon: "[1].image" }; - context.completions = Iterator(tabs.closedTabs); + context.completions = tabs.closedTabs.entries(); }, count: true, literal: 0, diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index 8cfdcb06..5db7d45a 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -256,7 +256,7 @@ var Buffer = Module("Buffer", { /** * @property {nsIURI} The current top-level document's URI. */ - get uri() util.newURI(this.win.location.href), + get uri() util.newURI(this.win.location.href), /** * @property {nsIURI} The current top-level document's URI, sans diff --git a/common/modules/cache.jsm b/common/modules/cache.jsm index fbb8013d..513ecbc4 100644 --- a/common/modules/cache.jsm +++ b/common/modules/cache.jsm @@ -267,7 +267,7 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), { if (this.queue.length && !this.inQueue) { // removeEntry does not work properly with queues. let removed = 0; - for (let [, entry] of this.queue) + for (let entry of this.queue) if (this.getCacheWriter().hasEntry(entry)) { this.getCacheWriter().removeEntry(entry, false); removed++; diff --git a/common/modules/finder.jsm b/common/modules/finder.jsm index fad4266c..4a63ada2 100644 --- a/common/modules/finder.jsm +++ b/common/modules/finder.jsm @@ -588,7 +588,7 @@ var RangeFind = Class("RangeFind", { let anonNodes = doc.getAnonymousNodes(doc.documentElement); if (anonNodes) { - for (let [, elem] of iter(anonNodes)) { + for (let elem of anonNodes) { let range = RangeFind.nodeContents(elem); pushRange(RangeFind.endpoint(range, true), RangeFind.endpoint(range, false)); } diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index 2a73f423..022034e1 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -449,9 +449,9 @@ var Highlights = Module("Highlight", { }, javascript: function initJavascript(dactyl, modules, window) { modules.JavaScript.setCompleter(["get", "set"].map(m => highlight[m]), - [ (context, obj, args) => Iterator(highlight.highlight) ]); + [ (context, obj, args) => iter(highlight.highlight) ]); modules.JavaScript.setCompleter(["highlightNode"].map(m => highlight[m]), - [ null, (context, obj, args) => Iterator(highlight.highlight) ]); + [ null, (context, obj, args) => iter(highlight.highlight) ]); } }); diff --git a/common/modules/io.jsm b/common/modules/io.jsm index 418a22d5..aa957e2b 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -98,7 +98,7 @@ var IO = Module("io", { outer: for (let dir of values(dirs)) { - for (let [, path] of iter(paths)) { + for (let path of paths) { let file = dir.child(path); dactyl.echomsg(_("io.searchingFor", JSON.stringify(file.path)), 3); diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm index 4fec76c9..cdcf9177 100644 --- a/common/modules/sanitizer.jsm +++ b/common/modules/sanitizer.jsm @@ -167,20 +167,23 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef if (!item.builtin && (!persistent || item.persistent) && item.name !== "all") ]; - function prefOverlay(branch, persistent, local) update(Object.create(local), { - before: [ - ["preferences", { id: branch.substr(Item.PREFIX.length) + "history", - xmlns: "xul" }, - template.map(ourItems(persistent), item => - ["preference", { type: "bool", id: branch + item.name, name: branch + item.name }])] - ], - init: function init(win) { - let pane = win.document.getElementById("SanitizeDialogPane"); - for (let [, pref] of iter(pane.preferences)) - pref.updateElements(); - init.superapply(this, arguments); - } - }); + function prefOverlay(branch, persistent, local) { + return update(Object.create(local), + { + before: [ + ["preferences", { id: branch.substr(Item.PREFIX.length) + "history", + xmlns: "xul" }, + template.map(ourItems(persistent), item => + ["preference", { type: "bool", id: branch + item.name, name: branch + item.name }])] + ], + init: function init(win) { + let pane = win.document.getElementById("SanitizeDialogPane"); + for (let pref of pane.preferences) + pref.updateElements(); + init.superapply(this, arguments); + } + }); + } util.timeout(function () { // Load order issue... diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 762fe243..dd2f0968 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -510,7 +510,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), if (acc.length == patterns.length) res.push(array(substrings).zip(acc).flatten().join("")); else - for (let [, pattern] of Iterator(patterns[acc.length])) + for (let pattern of patterns[acc.length]) rec(acc.concat(pattern)); }; rec([]);