mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-05 04:08:33 +00:00
Added "Read more" button to video description
This commit is contained in:
parent
8af87f1a8b
commit
c35896094d
@ -356,6 +356,11 @@ function get_youtube_comments(retries) {
|
|||||||
xhr.send();
|
xhr.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function read_more_description(srcButton) {
|
||||||
|
document.getElementById('descriptionWrapper').style.height = "unset";
|
||||||
|
srcButton.style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
function get_youtube_replies(target, load_more) {
|
function get_youtube_replies(target, load_more) {
|
||||||
var continuation = target.getAttribute('data-continuation');
|
var continuation = target.getAttribute('data-continuation');
|
||||||
|
|
||||||
|
@ -187,7 +187,18 @@ var video_data = {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<%= video.description_html %>
|
<% if video.description.size < 200 %>
|
||||||
|
<%= video.description_html %>
|
||||||
|
<% else %>
|
||||||
|
<div style="overflow: hidden;height: 8.3em;" id="descriptionWrapper">
|
||||||
|
<%= video.description_html %>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-23-24">
|
||||||
|
<p>
|
||||||
|
<a href="javascript:void(0)" onclick="read_more_description(this)"><%= translate(locale, "Read more") %></a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
Loading…
Reference in New Issue
Block a user