mirror of
https://github.com/mastodon/mastodon.git
synced 2026-07-07 00:03:53 -05:00
25 lines
470 B
Ruby
25 lines
470 B
Ruby
# frozen_string_literal: true
|
|
|
|
module HtmlHeadInspection
|
|
def head_link_icons
|
|
response
|
|
.parsed_body
|
|
.search('html head link[rel=icon]')
|
|
end
|
|
|
|
def head_meta_content(property)
|
|
response
|
|
.parsed_body
|
|
.search("html head meta[property='#{property}']")
|
|
.attr('content')
|
|
.text
|
|
end
|
|
|
|
def head_meta_exists(property)
|
|
!response
|
|
.parsed_body
|
|
.search("html head meta[property='#{property}']")
|
|
.empty?
|
|
end
|
|
end
|