From 339aab0846b9eed955c5aaf62d3e9f49b08525e0 Mon Sep 17 00:00:00 2001
From: teramako
Date: Sat, 12 Jan 2013 00:43:25 +0900
Subject: replace E4X. for vimperator 3.6+
---
feedSomeKeys_3.js | 42 ++++++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 20 deletions(-)
(limited to 'feedSomeKeys_3.js')
diff --git a/feedSomeKeys_3.js b/feedSomeKeys_3.js
index 30bf52d..fd08ec6 100644
--- a/feedSomeKeys_3.js
+++ b/feedSomeKeys_3.js
@@ -33,8 +33,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
}}} */
// INFO {{{
-let INFO = <>
-
:lazy fmaps -u='http://code.google.com/p/vimperator-labs/issues/list' o j k
:lazy fmaps -u='http://code.google.com/p/vimperator-labs/issues/detail' u
-
->;
+`;
// }}}
@@ -472,20 +471,23 @@ let INFO = <>
function list (condition) {
let maps = findMappings(condition);
let template = modules.template;
+ let length = 0;
let list =
-
- {
- template.map(maps, function (map)
- template.map(map.names, function (name)
-
- {name} |
- {map.feedSomeKeys.rhs} |
- {map.matchingUrls ? map.matchingUrls : '[Global]'} |
-
))
+ xml`
+ ${
+ template.map(maps, function (map){
+ ++length;
+ return template.map(map.names, function (name)
+ xml`
+ ${name} |
+ ${map.feedSomeKeys.rhs} |
+ ${map.matchingUrls ? map.matchingUrls : '[Global]'} |
+
`)
+ })
}
-
;
+
`;
- if (list.*.length() == list.text().length()) {
+ if (length == 0) {
liberator.echomsg("No mapping found");
return;
}
@@ -496,15 +498,15 @@ let INFO = <>
context.title = ['name', 'rhs & url'];
context.completions = [
[
- {map.names[0]},
+ xml`${map.names[0]},
- {map.feedSomeKeys.rhs}
- {
+ ${map.feedSomeKeys.rhs}
+ ${
args['-ignoreurls']
- ? <> for {map.matchingUrls ? map.matchingUrls : 'Global'}>
+ ? xml` for ${map.matchingUrls ? map.matchingUrls : 'Global'}`
: ''
}
-
+ `
]
for each (map in findMappings({urls: args['-urls'], ignoreUrls: args['-ignoreurls']}))
];
--
cgit v1.2.3