diff options
author | anekos | 2010-08-08 07:56:25 +0000 |
---|---|---|
committer | anekos | 2010-08-08 07:56:25 +0000 |
commit | 54e3847b927fb82b48b430613866a7ceb47f3138 (patch) | |
tree | 50800bb531fd154884b7ad84f9fea7fd4f34fcc3 /twittperator.js | |
parent | c9ea0deee0e612ff54228217ad0cd567ffe35c23 (diff) | |
download | vimperator-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-x | twittperator.js | 11 |
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; } } // }}} |