diff options
author | anekos | 2010-08-15 05:53:03 +0000 |
---|---|---|
committer | anekos | 2010-08-15 05:53:03 +0000 |
commit | c18c92acd773b079f074ace54d7d0c37fbdfbda6 (patch) | |
tree | e436a943a5999fb59f21f1206d11dc5aa68b8531 /twittperator.js | |
parent | 914dcbc352bfa480467ddf15b9a860edf03eecb1 (diff) | |
download | vimperator-plugins-c18c92acd773b079f074ace54d7d0c37fbdfbda6.tar.bz2 |
検索結果が 0 の時にそれを知らせる
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38274 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-x | twittperator.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/twittperator.js b/twittperator.js index 50ead27..805199a 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.1.1</version> + <version>1.1.2</version> <minVersion>2.3</minVersion> <maxVersion>2.4</maxVersion> <author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author> @@ -1589,7 +1589,12 @@ let PLUGIN_INFO = } tw.get("http://search.twitter.com/search.json", { q: word }, function(text) { - Twittperator.showTL(JSON.parse(text).results.map(Util.fixStatusObject).map(konbuArt)); + let results = JSON.parse(text).results; + if (results.length > 0) { + Twittperator.showTL(results.map(Util.fixStatusObject).map(konbuArt)); + } else { + Twittperator.echo("No results found.") + } }); }, // }}} sourceScriptFile: function (file) { // {{{ |