Created
October 22, 2012 16:21
-
-
Save hizuru/3932345 to your computer and use it in GitHub Desktop.
mikutterでviaをcopyするplugin―copy_tweet_source.rbのmikutter 0.1用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# ツイートのviaをコピーするためのmikutterコマンドを追加 | |
=begin | |
[導入方法]―plugin以下にcopy_tweet_sourceフォルダを作成し、その中に入れる。 | |
[使い方]―右クリックから"ツイートのviaをコピー"を選択するだけ! | |
あとはfav.rbやfilter.rbのソース指定の部分へペーストするのみ! | |
=end | |
Module.new do | |
Plugin.create(:copy_tweet_source).add_event_filter(:command){ |menu| | |
menu[:copy_tweet_source] = { | |
:slug => :copy_tweet_source, | |
:name => 'ツイートのviaをコピー', | |
:condition => lambda{ |m| m.message.repliable? }, | |
:exec => lambda{ |m| Gtk::Clipboard.copy(m.message[:source]) }, | |
:visible => true, | |
:role => :message } | |
[menu] | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment