mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-01 11:06:08 -04:00
Add alt links for all youtube endpoints
This commit is contained in:
parent
aa20f0424d
commit
b7f673b1e1
1 changed files with 1 additions and 1 deletions
|
@ -484,7 +484,7 @@ def add_alt_links(html)
|
||||||
anchor = anchor.xpath_node("//a").not_nil!
|
anchor = anchor.xpath_node("//a").not_nil!
|
||||||
url = URI.parse(HTML.unescape(anchor["href"]))
|
url = URI.parse(HTML.unescape(anchor["href"]))
|
||||||
|
|
||||||
if ["www.youtube.com", "m.youtube.com"].includes?(url.host) && url.path == "/watch" || url.path == "/redirect"
|
if ["www.youtube.com", "m.youtube.com"].includes?(url.host)
|
||||||
alt_link = <<-END_HTML
|
alt_link = <<-END_HTML
|
||||||
<a href="#{url.full_path}">
|
<a href="#{url.full_path}">
|
||||||
<i class="fa fa-link" aria-hidden="true"></i>
|
<i class="fa fa-link" aria-hidden="true"></i>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue