diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-03-07 22:15:35 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-03-07 22:15:35 -0600 |
| commit | 9886953fb68be60dcdd216995c7e061acc9a8f5b (patch) | |
| tree | 9e01fb92455cecce03f52b22d2f45a7102de1b7c /src | |
| parent | fd1bd35b429fbd903e080824b98d76bfdcf8bd76 (diff) | |
| download | invidious-9886953fb68be60dcdd216995c7e061acc9a8f5b.tar.gz invidious-9886953fb68be60dcdd216995c7e061acc9a8f5b.tar.bz2 invidious-9886953fb68be60dcdd216995c7e061acc9a8f5b.zip | |
Add link for shortened youtube url
Diffstat (limited to 'src')
| -rw-r--r-- | src/helpers.cr | 2 |
1 files changed, 1 insertions, 1 deletions
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 <a href="#{url.full_path}"> <i class="fa fa-link" aria-hidden="true"></i> |
