From 072c8698411c9870d7ef2708ae4a1c3fb2b978e4 Mon Sep 17 00:00:00 2001 From: Toks Date: Sun, 26 Oct 2014 10:53:04 -0400 Subject: [PATCH] fixes #2285 Notes need to be disabled because they don't work on webms, the positions are bugged. Also enable video controls by default because why not. --- app/assets/javascripts/notes.js | 2 +- app/views/posts/partials/show/_video.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index fa5e9486c..a3f0e17ed 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -682,7 +682,7 @@ Danbooru.Note = { } $(function() { - if ($("#c-posts").length && $("#a-show").length && $("#image").length) { + if ($("#c-posts").length && $("#a-show").length && $("#image").length && !$("video#image").length) { if ($("#note-locked-notice").length == 0) { $("#translate").bind("click", Danbooru.Note.TranslationMode.toggle); $(document).bind("keypress", "n", Danbooru.Note.TranslationMode.toggle); diff --git a/app/views/posts/partials/show/_video.html.erb b/app/views/posts/partials/show/_video.html.erb index aa0090c38..30bf71fc9 100644 --- a/app/views/posts/partials/show/_video.html.erb +++ b/app/views/posts/partials/show/_video.html.erb @@ -1,3 +1,3 @@ -<%= content_tag(:video, nil, :width => post.image_width, :height => post.image_height, :autoplay => true, :loop => true, :src => post.file_url) %> +<%= content_tag(:video, nil, :id => "image", :width => post.image_width, :height => post.image_height, :autoplay => true, :loop => true, :controls => "controls", :src => post.file_url) %>

<%= link_to "Save this video (right click and save)", post.file_url %>