提案 #1472 » 1472.patch
plugin/mastodon/mastodon.rb | ||
---|---|---|
17 | 17 |
require_relative 'score' |
18 | 18 | |
19 | 19 |
Plugin.create(:mastodon) do |
20 |
defimageopener(_('Mastodon添付画像'), %r<\Ahttps?://[^/]+/system/media_attachments/files/[0-9]{3}/[0-9]{3}/[0-9]{3}/\w+/\w+\.\w+(?:\?\d+)?\Z>) do |url|
|
|
20 |
defimageopener(_('Mastodon添付画像'), %r<\Ahttps?://[^/]+/system/(cache/)?media_attachments/files/([0-9]{3}/)+\w+/\w+\.\w+(?:\?\d+)?\Z>) do |url|
|
|
21 | 21 |
URI.open(url) |
22 | 22 |
end |