aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2010-08-08 07:56:25 +0000
committeranekos2010-08-08 07:56:25 +0000
commit54e3847b927fb82b48b430613866a7ceb47f3138 (patch)
tree50800bb531fd154884b7ad84f9fea7fd4f34fcc3 /twittperator.js
parentc9ea0deee0e612ff54228217ad0cd567ffe35c23 (diff)
downloadvimperator-plugins-54e3847b927fb82b48b430613866a7ceb47f3138.tar.bz2
修正&改善
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38225 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-xtwittperator.js11
1 files changed, 4 insertions, 7 deletions
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 =
<name>twittperator</name>
<description>Twitter Client using ChirpStream</description>
<description lang="ja">OAuth対応Twitterクライアント</description>
- <version>1.0.6</version>
+ <version>1.0.7</version>
<minVersion>2.3</minVersion>
<maxVersion>2.4</maxVersion>
<author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author>
@@ -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;
}
} // }}}