鍵垢のツイート背景をグレーにするmikutterプラグイン
#-*- coding: utf-8 -*- | |
Plugin.create :gray_protected_users do | |
UserConfig[:protected_users_background_color] ||= [0xcccc,0xcccc,0xcccc] | |
filter_message_background_color do | mp, array | | |
if mp.to_message.user[:protected] == true | |
array = UserConfig[:protected_users_background_color] | |
end | |
[mp, array] | |
end | |
settings("Protected_Users_Color") do | |
color("鍵付きユーザの背景色",:protected_users_background_color) | |
end | |
end |
This comment has been minimized.
This comment has been minimized.
mikutter 3.6.0 では以下の警告が出るようです。
no replacement と言われてますが、とりあえず単純に to_message を message に変更すれば警告は消えて意図通り動作もするようです。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
設定画面で背景色指定できるforkを作ってみました.よろしければマージしていただけると幸いです.
なお修正箇所のライセンスはNYSLですので煮るなり焼くなり好きにしていただければ嬉しいです.