More consistent HTML IDs for info section (#1156)

* More consistent IDs for info section

More consistent IDs for info section: watch-on-youtube, annotations and download

* Consistent IDs: channel-name

* Consistent IDs: published-date

The term "published" can also be found in the answer for the following YouTube API request: https://developers.google.com/youtube/v3/docs/videos/list
このコミットが含まれているのは:
mendel5 2020-05-26 09:57:10 +02:00 committed by GitHub
コミット 80941eacbd
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更5行の追加5行の削除

ファイルの表示

@ -86,10 +86,10 @@
<div class="pure-g">
<div class="pure-u-1 pure-u-lg-1-5">
<div class="h-box">
<span>
<span id="watch-on-youtube">
<a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch on YouTube") %></a>
</span>
<p>
<p id="annotations">
<% if params.annotations %>
<a href="/watch?<%= env.params.query %>&iv_load_policy=3">
<%= translate(locale, "Hide annotations") %>
@ -130,7 +130,7 @@
<% end %>
<% if CONFIG.dmca_content.includes?(video.id) || CONFIG.disabled?("downloads") %>
<p><%= translate(locale, "Download is disabled.") %></p>
<p id="download"><%= translate(locale, "Download is disabled.") %></p>
<% else %>
<form class="pure-form pure-form-stacked" action="/latest_version" method="get" rel="noopener" target="_blank">
<div class="pure-control-group">
@ -199,7 +199,7 @@
<a href="/channel/<%= video.ucid %>" style="display:block;width:fit-content;width:-moz-fit-content">
<div class="channel-profile">
<img src="/ggpht<%= URI.parse(video.author_thumbnail).full_path %>">
<span><%= video.author %></span>
<span id="channel-name"><%= video.author %></span>
</div>
</a>
@ -208,7 +208,7 @@
<% sub_count_text = video.sub_count_text %>
<%= rendered "components/subscribe_widget" %>
<p>
<p id="published-date">
<% if video.premiere_timestamp %>
<b><%= translate(locale, "Premieres `x`", video.premiere_timestamp.not_nil!.to_s("%B %-d, %R UTC")) %></b>
<% else %>