Skip to content

Instantly share code, notes, and snippets.

@cosmo0920
Created October 1, 2012 21:54
Show Gist options
  • Save cosmo0920/3814709 to your computer and use it in GitHub Desktop.
Save cosmo0920/3814709 to your computer and use it in GitHub Desktop.
show_faceを使って何処のツイートを指しているかを見てみる
--- nested_quote.rb.orig 2012-10-02 00:24:24.000000000 +0900
+++ nested_quote.rb 2012-10-02 06:51:49.000000000 +0900
@@ -179,6 +179,13 @@
Plugin.create :nested_quote do
command(:copy_tweet_url,
name: 'ツイートのURLをコピー',
+ show_face: Proc.new{ |m|
+ whotwi = m.messages.first.message.idname
+ if m.messages.first.message.to_s.length > 20 then
+ show_message = m.messages.first.message.to_s[0, 20] + "..."
+ else
+ show_message = m.messages.first.message.to_s end
+ "#{whotwi}:\"#{show_message}".gsub(/_/,'__')+"\"のツイートのURLをコピー"},
condition: Proc.new{ |opt|
not opt.messages.empty? { |m|
not m.messages.system?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment