mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-09 03:54:11 +01:00
Clean up some old-style iterator gunk.
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user