aboutsummaryrefslogtreecommitdiffstats
path: root/walk-input.js
diff options
context:
space:
mode:
authordrry2008-11-06 09:41:41 +0000
committerdrry2008-11-06 09:41:41 +0000
commit644e6c5749c7d296ef42c83dd4722ad862c7c720 (patch)
treeed87bb87f7ef949e8e83a7ee86f80f51e640481d /walk-input.js
parentc63f3f885873bd35efceb4b4205e768cc121656e (diff)
downloadvimperator-plugins-644e6c5749c7d296ef42c83dd4722ad862c7c720.tar.bz2
* cosmetic changes.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@22830 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'walk-input.js')
-rw-r--r--walk-input.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/walk-input.js b/walk-input.js
index cf84325..885a96c 100644
--- a/walk-input.js
+++ b/walk-input.js
@@ -9,16 +9,16 @@
// If you type M-i first, the focus moves to "<input name='search' />".
// Then if you type M-i once more, the focus moves to "<input name='name' />".
//
-// <html><body>
+// <html>
// <input name="search" />
// <a href="xxx">xxx</a>
// <a href="yyy">yyy</a>
// <a href="zzz">zzz</a>
// <input name="name" />
-// <textarea name="comment" />
-// </body></html>
+// <textarea name="comment"></textarea>
+// </html>
-(function(){
+(function() {
var walkinput = function() {
var win = document.commandDispatcher.focusedWindow;
var d = win.document;
@@ -29,8 +29,8 @@ var walkinput = function() {
var focused = document.commandDispatcher.focusedElement;
var current = null;
var next = null;
- for (var i = 0; i < list.snapshotLength; ++i) {
- var e = list.snapshotItem(i);
+ for (let i = 0; i < list.snapshotLength; ++i) {
+ let e = list.snapshotItem(i);
if (e == focused) {
current = e;
} else if (current && next == null) {
@@ -44,8 +44,8 @@ var walkinput = function() {
}
};
-liberator.modules.mappings.add([liberator.modules.modes.NORMAL], ['<M-i>'], 'Walk Input Fields', function() { walkinput(); });
-liberator.modules.mappings.add([liberator.modules.modes.INSERT], ['<M-i>'], 'Walk Input Fields', function() { walkinput(); });
-liberator.modules.mappings.add([liberator.modules.modes.NORMAL], ['<A-i>'], 'Walk Input Fields', function() { walkinput(); });
-liberator.modules.mappings.add([liberator.modules.modes.INSERT], ['<A-i>'], 'Walk Input Fields', function() { walkinput(); });
+liberator.modules.mappings.add([liberator.modules.modes.NORMAL], ['<M-i>'], 'Walk Input Fields', walkinput);
+liberator.modules.mappings.add([liberator.modules.modes.INSERT], ['<M-i>'], 'Walk Input Fields', walkinput);
+liberator.modules.mappings.add([liberator.modules.modes.NORMAL], ['<A-i>'], 'Walk Input Fields', walkinput);
+liberator.modules.mappings.add([liberator.modules.modes.INSERT], ['<A-i>'], 'Walk Input Fields', walkinput);
})();