aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator
diff options
context:
space:
mode:
Diffstat (limited to 'twittperator')
-rw-r--r--twittperator/eject-alert.tw19
1 files changed, 19 insertions, 0 deletions
diff --git a/twittperator/eject-alert.tw b/twittperator/eject-alert.tw
new file mode 100644
index 0000000..9e6fe5a
--- /dev/null
+++ b/twittperator/eject-alert.tw
@@ -0,0 +1,19 @@
+/*
+ * Please write the below line into .vimperatorrc.
+ * let g:twittperator_plugin_reply_eject_alert = 1
+ * let g:twittperator_screen_name = "<YOUR_SCREEN_NAME>"
+ */
+
+(function () {
+ let screenName = liberator.globalVariables.twittperator_screen_name;
+
+ plugins.twittperator.ChirpUserStream.addListener(
+ function onMsg (msg, raw) {
+ if (msg.text && msg.user && msg.in_reply_to_screen_name === screenName)
+ io.system('eject && eject -t');
+ }
+ );
+})();
+
+// vim: sw=2 ts=2 et fdm=marker ft=javascript:
+