機能 #599 » copy_link.patch
core/plugin/command/command.rb | ||
---|---|---|
132 | 132 |
opt.messages[0].entity.to_a.each {|u| |
133 | 133 |
::Gtk::TimeLine.openurl(u[:url]) if u[:slug] == :urls } end |
134 | 134 | |
135 |
command(:copy_link, |
|
136 |
name: _('リンクをコピー'), |
|
137 |
condition: Plugin::Command[:HasOneMessage] & lambda{ |opt| |
|
138 |
opt.messages[0].entity.to_a.any? {|u| u[:slug] == :urls } }, |
|
139 |
visible: true, |
|
140 |
role: :timeline) do |opt| |
|
141 |
opt.messages[0].entity.to_a.each {|u| |
|
142 |
::Gtk::Clipboard.copy(u[:url]) if u[:slug] == :urls } end |
|
143 | ||
135 | 144 |
command(:new_pane, |
136 | 145 |
name: _('新規ペインに移動'), |
137 | 146 |
condition: lambda{ |opt| |