aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2010-08-13 04:23:19 +0000
committeranekos2010-08-13 04:23:19 +0000
commit0d0535336507599ecefd7e33ee7d50b46d03cdd6 (patch)
treec283fe21f8bb9f750ea2415430cb1d75eaf9b47a /twittperator.js
parent04ed49d09e83128a51a5ccbaad3172b5d5e49e20 (diff)
downloadvimperator-plugins-0d0535336507599ecefd7e33ee7d50b46d03cdd6.tar.bz2
自分のツィーツを補完に出さないように
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38254 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-xtwittperator.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/twittperator.js b/twittperator.js
index af6e987..971e835 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.0</version>
+ <version>1.1.1</version>
<minVersion>2.3</minVersion>
<maxVersion>2.4</maxVersion>
<author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author>
@@ -1557,26 +1557,31 @@ let PLUGIN_INFO =
let (s = ("retweeted_status" in status) ? status.retweeted_status : status)
func(s); // }}}
+ function rejectMine(statuses)
+ let (n = setting.screenName)
+ (n ? statuses.filter(function(st) (!st.user || st.user.screen_name !== n)) : statuses);
+
+
const Completers = { // {{{
name: function(context, args) {
context.completions =
- history.map(rt(function(s) ["@" + s.user.screen_name, s]));
+ rejectMine(history).map(rt(function(s) ["@" + s.user.screen_name, s]));
},
link: function(context, args) {
context.completions =
- history.map(rt(function(s) [s.text, s])).filter(function([t]) /https?:\/\//(t));
+ rejectMine(history).map(rt(function(s) [s.text, s])).filter(function([t]) /https?:\/\//(t));
},
text: function(context, args) {
context.completions =
- history.map(rt(function(s) [s.text, s]));
+ rejectMine(history).map(rt(function(s) [s.text, s]));
},
name_id: function(context, args) {
context.completions =
- history.map(rt(function(s) ["@" + s.user.screen_name + "#" + s.id, s]));
+ rejectMine(history).map(rt(function(s) ["@" + s.user.screen_name + "#" + s.id, s]));
},
name_id_text: function(context, args) {
context.completions =
- history.map(rt(function(s) ["@" + s.user.screen_name + "#" + s.id + ": " + s.text, s]));
+ rejectMine(history).map(rt(function(s) ["@" + s.user.screen_name + "#" + s.id + ": " + s.text, s]));
}
}; // }}}
@@ -1805,6 +1810,7 @@ let PLUGIN_INFO =
showTLURLScheme: let (v = gv.twittperator_show_tl_with_https_url) ("http" + (v === false ? "" : "s")),
proxyHost: gv.twittperator_proxy_host,
proxyPort: gv.twittperator_proxy_port,
+ screenName: gv.twittperator_screen_name
});
let statusRefreshTimer;