Created
May 11, 2016 19:48
-
-
Save zwpp/aa8005158d08fa0c38bd01a1b49946ba to your computer and use it in GitHub Desktop.
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 -*- | |
Plugin.create(:anti_url) do | |
command(:anti_url_command, | |
name: 'URL化を回避する', | |
condition: lambda{ |opt| true }, | |
visible: true, | |
role: :postbox) do |opt| | |
# postboxからメッセジ拾う | |
message = Plugin[:gtk].widgetof(opt.widget).widget_post.buffer.text | |
# dotをそれっぽい文字に変える | |
str = message.tr(".", "\u{2024}") | |
# postbox書き込み | |
Plugin[:gtk].widgetof(opt.widget).widget_post.buffer.text = str | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment