diff options
| author | anekos | 2011-08-02 23:21:49 +0900 | 
|---|---|---|
| committer | anekos | 2011-08-02 23:22:25 +0900 | 
| commit | f9de882a9eee135f9a8d2ada79f769ea9fee2ba4 (patch) | |
| tree | 78d54aac08a63cb8fc39d61a923f82319eeb5159 | |
| parent | 2e1604b40a67fae7240727027ce810318d95146d (diff) | |
| download | vimperator-plugins-f9de882a9eee135f9a8d2ada79f769ea9fee2ba4.tar.bz2 | |
-selector オプション追加
| -rw-r--r-- | feedSomeKeys_3.js | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/feedSomeKeys_3.js b/feedSomeKeys_3.js index 2f2f9b6..ea6d39d 100644 --- a/feedSomeKeys_3.js +++ b/feedSomeKeys_3.js @@ -34,7 +34,7 @@ THE POSSIBILITY OF SUCH DAMAGE.  // INFO {{{  let INFO = <> -  <plugin name="feedSomeKeys" version="1.9.0" +  <plugin name="feedSomeKeys" version="1.9.1"            href="http://github.com/vimpr/vimperator-plugins/blob/master/feedSomeKeys_3.js"            summary="Feed some defined key events into the Web content"            lang="en-US" @@ -559,6 +559,10 @@ let INFO = <>                  elem = or(frames, function (f) fromXPath(f.document, args['-xpath'])) || elem;                } +              if (args['-selector']) { +                elem = or(frames, function (f) f.document.querySelector(args['-selector'])) || elem; +              } +                feed(rhs, args['-events'] || ['keypress'], elem);              },              { @@ -602,6 +606,7 @@ let INFO = <>            [['-desc', '-description', '-d'], commands.OPTION_STRING],            [['-frame', '-f'], commands.OPTION_INT, null, frameCompleter],            [['-xpath', '-x'], commands.OPTION_STRING, xpathValidator], +          [['-selector', '-s'], commands.OPTION_STRING],            [['-prefix', '-p'], commands.OPTION_STRING],            [              ['-events', '-e'],  | 
