From 54e3847b927fb82b48b430613866a7ceb47f3138 Mon Sep 17 00:00:00 2001
From: anekos
Date: Sun, 8 Aug 2010 07:56:25 +0000
Subject: 修正&改善
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38225 d0d07461-0603-4401-acd4-de1884942a52
---
twittperator.js | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
(limited to 'twittperator.js')
diff --git a/twittperator.js b/twittperator.js
index 728d5ec..d1aeefd 100755
--- a/twittperator.js
+++ b/twittperator.js
@@ -28,7 +28,7 @@ let PLUGIN_INFO =
twittperator
Twitter Client using ChirpStream
OAuth対応Twitterクライアント
- 1.0.6
+ 1.0.7
2.3
2.4
teramako
@@ -1500,18 +1500,15 @@ let PLUGIN_INFO =
} // }}}
function sourceScriptFile(file) { // {{{
// XXX 悪い子向けのハックです。すみません。 *.tw ファイルを *.js のように読み込みます。
- function getScriptName(file)
- file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function(m, n1) n1.toUpperCase());
-
file = file.clone();
let toString = file.toString;
- let scriptName = getScriptName(file);
- let script = liberator.plugins[scriptName];
+ let script = liberator.plugins.contexts[file.path];
file.toString = function() this.path.replace(/\.tw$/, ".js");
try {
io.source(file, false);
} finally {
- liberator.plugins[scriptName] = liberator.plugins.contexts[file.path];
+ if (script)
+ liberator.plugins[script.NAME] = script;
file.toString = toString;
}
} // }}}
--
cgit v1.2.3