aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--feedSomeKeys_2.js4
-rw-r--r--toggler.js4
-rw-r--r--twitterView.js10
-rw-r--r--umihara.js20
4 files changed, 16 insertions, 22 deletions
diff --git a/feedSomeKeys_2.js b/feedSomeKeys_2.js
index 927c0e6..67177a7 100644
--- a/feedSomeKeys_2.js
+++ b/feedSomeKeys_2.js
@@ -203,7 +203,7 @@ function destroy(){
feedMaps.forEach(function(map){
mappings.remove(map.modes[0],map.names[0]);
});
- }catch(e){ log(map); }
+ }catch(e){ liberator.log(map); }
origMaps.forEach(function(map){
addUserMap(map);
});
@@ -257,7 +257,7 @@ function feedKeyIntoContent(keys, useVkey){
var charCode = keys.charCodeAt(i);
keyCode = 0;
}
- if (keys[i] == '<'){
+ if (keys[i] == '<'){
var matches = keys.substr(i + 1).match(/^((?:[ACMSacms]-)*)([^>]+)/);
if (matches) {
if (matches[1]) {
diff --git a/toggler.js b/toggler.js
index c7c9154..aa50625 100644
--- a/toggler.js
+++ b/toggler.js
@@ -6,7 +6,7 @@
* ==/VimperatorPlugin==
*
* 何かしらの設定をクルクル変更したい人へ
- *
+ *
* まず、最初に以下の例ように.vimperatorrcに定義する
js <<EOM
liberator.globalVariables.toggler = {
@@ -20,7 +20,7 @@ liberator.globalVariables.toggler = {
//...
};
EOM
- *
+ *
* 次に
* :toggle go
* とコマンドを実行するとsetting commands配列の次を実行する
diff --git a/twitterView.js b/twitterView.js
index bbd7c3a..d532d75 100644
--- a/twitterView.js
+++ b/twitterView.js
@@ -1,9 +1,9 @@
// Vimperator plugin: 'Statusbar Twitter'
-// Last Change: 09-May-2008. Jan 2008
+// Last Change: 02-Dec-2008
// License: Creative Commons
// Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid
//
-// show Twitter on statusesbar script for Vimperator 0.6.*
+// show Twitter on statusesbar script for Vimperator 2.0pre
(function(){
const checkTime = 90 * 1000;
@@ -106,10 +106,10 @@
}
}
- liberator.mappings.addUserMap([liberator.modes.NORMAL],[",r"],
+ liberator.modules.mappings.add([liberator.modules.modes.NORMAL],[",r"],
"Reply to current user",
- function (){ liberator.commandline.open(":","twitter @" + lastestStatus.user.screen_name + " ",liberator.modes.EX); });
- liberator.mappings.addUserMap([liberator.modes.NORMAL],[",f"],
+ function (){ liberator.modules.commandline.open(":","twitter @" + lastestStatus.user.screen_name + " ",liberator.modules.modes.EX); });
+ liberator.modules.mappings.add([liberator.modules.modes.NORMAL],[",f"],
"Favorite to current user",
function (){ favoriteStatus(lastestStatus.id); });
})();
diff --git a/umihara.js b/umihara.js
index 49a871b..ef3f41b 100644
--- a/umihara.js
+++ b/umihara.js
@@ -22,7 +22,7 @@
const re = /<td nowrap>(\d+:\d+)<\/td><td>([\d,]+\.[\d,]+)<\/td><td><b>([\d,]+\.[\d,]+)<\/b><\/td><\/tr><\/table><\/div>/;
- const cl = [
+ const ContryCodes = [
['USD', '\u30a2\u30e1\u30ea\u30ab\u30c9\u30eb'],
['GBP', '\u30a4\u30ae\u30ea\u30b9 \u30dd\u30f3\u30c9'],
['INR', '\u30a4\u30f3\u30c9 \u30eb\u30d4\u30fc'],
@@ -93,17 +93,11 @@
let extra = {
argCount: '+',
bang: true,
- completer: function (context, arg, bang) {
+ completer: function (context, args) {
let last = context.contextList.slice(-1)[0];
- context.title = ['Country Code'];
+ context.title = ['Country Code', 'Country Name'];
context.advance(last.offset - last.caret);
- context.items = completion.filter(cl, last.filter);
- /*
- if (!(arg = commands.parseArgs(arg, extra.options, extra.argCount)))
- return [0, []];
- let m = arg.string.match(/\s(\w+)$/);
- return [(m ? m.index : arg.string.length) + 1, m ? completion.filter(cl, m[1]) : cl];
- */
+ context.completions = ContryCodes;
}
};
@@ -111,10 +105,10 @@
commands.addUserCommand(
['kawase'],
'Umihara Kawase Meow',
- function (arg, clipboard) {
- let [value, from, to] = arg.arguments;
+ function (args) {
+ let [value, from, to] = args;
value = eval(value);
- kawase(value, clipboard, from, to);
+ kawase(value, args.bang, from, to);
},
extra,
true