diff options
author | drry | 2008-11-21 13:49:51 +0000 |
---|---|---|
committer | drry | 2008-11-21 13:49:51 +0000 |
commit | 4490fef72b1889a90cbab9370e1e6716ee77e2db (patch) | |
tree | ca6246135b235d35178bd4618480ea909e7805d8 | |
parent | 3fef7cbb068ec09a97c8067919da0df514a76487 (diff) | |
download | vimperator-plugins-4490fef72b1889a90cbab9370e1e6716ee77e2db.tar.bz2 |
* 小さな変更でありんす。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24578 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | blinkelement.js | 2 | ||||
-rw-r--r-- | hidecritter.js | 2 | ||||
-rw-r--r-- | walk-input.js | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/blinkelement.js b/blinkelement.js index 5d2c700..3393c53 100644 --- a/blinkelement.js +++ b/blinkelement.js @@ -1,6 +1,6 @@ /* * ==VimperatorPlugin== - * @name nicontroller.js + * @name blinkelement.js * @description blink specified elements. * @description-ja 指定した要素を点滅させる。 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> diff --git a/hidecritter.js b/hidecritter.js index 7c48ff0..ed9d43a 100644 --- a/hidecritter.js +++ b/hidecritter.js @@ -1,6 +1,6 @@ /* * ==VimperatorPlugin== - * @name nicontroller.js + * @name hidecritter.js * @description hide specified elements. * @description-ja 指定した要素を隠す。 * @author janus_wel <janus_wel@fb3.so-net.ne.jp> diff --git a/walk-input.js b/walk-input.js index 70c6590..77ff522 100644 --- a/walk-input.js +++ b/walk-input.js @@ -18,11 +18,11 @@ // <textarea name="comment"></textarea> // </html> -(function() { +(function () { var xpath = '//input[@type="text" or @type="password" or @type="search" or not(@type)] | //textarea'; -var walkinput = function(forward) { +var walkinput = function (forward) { var focused = document.commandDispatcher.focusedElement; var current = null; var next = null; @@ -32,7 +32,7 @@ var walkinput = function(forward) { (function (frame) { var doc = frame.document; if (doc.body.localName.toLowerCase() == 'body') { - var r = doc.evaluate(xpath, doc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + let r = doc.evaluate(xpath, doc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (let i = 0, l = r.snapshotLength; i < l; ++i) { let e = r.snapshotItem(i); list.push(e); @@ -52,7 +52,7 @@ var walkinput = function(forward) { if (list.length <= 0) return; - let elem = forward ? (next || list[0]) + var elem = forward ? (next || list[0]) : (prev || list[list.length - 1]); elem.focus(); |