Skip to content

Instantly share code, notes, and snippets.

@pocke
Forked from penguin2716/gray_protected_users.rb
Last active September 30, 2016 14:50
Show Gist options
  • Save pocke/6971b80b28b1da0373c9 to your computer and use it in GitHub Desktop.
Save pocke/6971b80b28b1da0373c9 to your computer and use it in GitHub Desktop.
鍵垢のツイート背景をグレーにする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.message.user[:protected] == true && !Service.services.map(&:user).include?(mp.message.user.idname)
array = UserConfig[:protected_users_background_color]
end
[mp, array]
end
settings("Protected_Users_Color") do
color("鍵付きユーザの背景色",:protected_users_background_color)
end
end
@pocke
Copy link
Author

pocke commented Aug 9, 2015

自分自身を灰色にしない

@pocke
Copy link
Author

pocke commented Sep 30, 2016

fix deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment