From 9886953fb68be60dcdd216995c7e061acc9a8f5b Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 7 Mar 2018 22:15:35 -0600 Subject: [PATCH] Add link for shortened youtube url --- src/helpers.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.cr b/src/helpers.cr index deb46080..8127c4bc 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -351,7 +351,7 @@ def add_alt_links(html) anchor = anchor.xpath_node("//a").not_nil! url = URI.parse(HTML.unescape(anchor["href"])) - if ["www.youtube.com", "youtu.be", "m.youtube.com"].includes?(url.host) && url.path == "/watch" + if ["www.youtube.com", "m.youtube.com"].includes?(url.host) && url.path == "/watch" || url.host == "youtu.be" alt_link = <<-END_HTML