Add option to listen by default

This commit is contained in:
Omar Roth
2018-10-30 09:41:23 -05:00
parent 8794e26e67
commit e39dec9778
5 changed files with 24 additions and 14 deletions

View File

@@ -23,6 +23,11 @@ function update_value(element) {
<input name="autoplay" id="autoplay" type="checkbox" <% if user.preferences.autoplay %>checked<% end %>>
</div>
<div class="pure-control-group">
<label for="listen">Listen by default: </label>
<input name="listen" id="listen" type="checkbox" <% if user.preferences.listen %>checked<% end %>>
</div>
<div class="pure-control-group">
<label for="speed">Default speed: </label>
<select name="speed" id="speed">

View File

@@ -35,7 +35,7 @@
<h1>
<%= HTML.escape(video.title) %>
<% if params[:listen] %>
<a href="/watch?<%= env.params.query %>">
<a href="/watch?<%= env.params.query %>&listen=0">
<i class="icon ion-ios-videocam"></i>
</a>
<% else %>