2018-07-16 21:54:24 +05:30
|
|
|
<% content_for "header" do %>
|
|
|
|
<title>Preferences - Invidious</title>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function update_value(element) {
|
|
|
|
document.getElementById('volume-value').innerText = element.value;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="h-box">
|
|
|
|
<form class="pure-form pure-form-aligned" action="/preferences?referer=<%= referer %>" method="post">
|
|
|
|
<fieldset>
|
|
|
|
<legend>Player preferences</legend>
|
2018-07-16 21:54:24 +05:30
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="video_loop">Always loop: </label>
|
|
|
|
<input name="video_loop" id="video_loop" type="checkbox" <% if user.preferences.video_loop %>checked<% end %>>
|
|
|
|
</div>
|
2018-07-16 21:54:24 +05:30
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="autoplay">Autoplay: </label>
|
|
|
|
<input name="autoplay" id="autoplay" type="checkbox" <% if user.preferences.autoplay %>checked<% end %>>
|
|
|
|
</div>
|
2018-07-16 21:54:24 +05:30
|
|
|
|
2018-10-30 20:11:23 +05:30
|
|
|
<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>
|
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="speed">Default speed: </label>
|
|
|
|
<select name="speed" id="speed">
|
2018-08-12 01:33:24 +05:30
|
|
|
<% {2.0, 1.5, 1.0, 0.5}.each do |option| %>
|
2018-07-26 20:29:05 +05:30
|
|
|
<option <% if user.preferences.speed == option %> selected <% end %>><%= option %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
2018-07-16 22:27:52 +05:30
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="quality">Preferred video quality: </label>
|
|
|
|
<select name="quality" id="quality">
|
2018-09-25 05:58:36 +05:30
|
|
|
<% {"dash", "hd720", "medium", "small"}.each do |option| %>
|
2018-07-26 20:29:05 +05:30
|
|
|
<option <% if user.preferences.quality == option %> selected <% end %>><%= option %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
2018-07-16 21:54:24 +05:30
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="volume">Player volume: </label>
|
|
|
|
<input name="volume" id="volume" oninput="update_value(this);" type="range" min="0" max="100" step="5" value="<%= user.preferences.volume %>">
|
|
|
|
<span class="pure-form-message-inline" id="volume-value"><%= user.preferences.volume %></span>
|
|
|
|
</div>
|
2018-07-16 21:54:24 +05:30
|
|
|
|
2018-07-28 20:19:58 +05:30
|
|
|
<div class="pure-control-group">
|
2018-08-26 05:03:15 +05:30
|
|
|
<label for="comments_0">Default comments: </label>
|
|
|
|
<select name="comments_0" id="comments_0">
|
|
|
|
<% {"", "youtube", "reddit"}.each do |option| %>
|
|
|
|
<option <% if user.preferences.comments[0] == option %> selected <% end %>><%= option %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="comments_1">Fallback comments: </label>
|
|
|
|
<select name="comments_1" id="comments_1">
|
|
|
|
<% {"", "youtube", "reddit"}.each do |option| %>
|
|
|
|
<option <% if user.preferences.comments[1] == option %> selected <% end %>><%= option %></option>
|
2018-07-28 20:19:58 +05:30
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2018-08-06 23:53:36 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="captions_0">Default captions: </label>
|
|
|
|
<select class="pure-u-1-5" name="captions_0" id="captions_0">
|
|
|
|
<% CAPTION_LANGUAGES.each do |option| %>
|
|
|
|
<option <% if user.preferences.captions[0] == option %> selected <% end %>><%= option %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-control-group">
|
2018-08-31 03:19:38 +05:30
|
|
|
<label for="captions_fallback">Fallback captions: </label>
|
2018-08-06 23:53:36 +05:30
|
|
|
<select class="pure-u-1-5" name="captions_1" id="captions_1">
|
|
|
|
<% CAPTION_LANGUAGES.each do |option| %>
|
|
|
|
<option <% if user.preferences.captions[1] == option %> selected <% end %>><%= option %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select class="pure-u-1-5" name="captions_2" id="captions_2">
|
|
|
|
<% CAPTION_LANGUAGES.each do |option| %>
|
|
|
|
<option <% if user.preferences.captions[2] == option %> selected <% end %>><%= option %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2018-08-31 03:19:38 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="related_videos">Show related videos? </label>
|
|
|
|
<input name="related_videos" id="related_videos" type="checkbox" <% if user.preferences.related_videos %>checked<% end %>>
|
|
|
|
</div>
|
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<legend>Visual preferences</legend>
|
2018-08-31 03:19:38 +05:30
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="dark_mode">Dark mode: </label>
|
|
|
|
<input name="dark_mode" id="dark_mode" type="checkbox" <% if user.preferences.dark_mode %>checked<% end %>>
|
|
|
|
</div>
|
2018-07-16 21:54:24 +05:30
|
|
|
|
2018-07-26 22:39:29 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="thin_mode">Thin mode: </label>
|
|
|
|
<input name="thin_mode" id="thin_mode" type="checkbox" <% if user.preferences.thin_mode %>checked<% end %>>
|
|
|
|
</div>
|
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<legend>Subscription preferences</legend>
|
2018-08-31 03:19:38 +05:30
|
|
|
|
2018-07-29 09:01:02 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="redirect_feed">Redirect homepage to feed: </label>
|
|
|
|
<input name="redirect_feed" id="redirect_feed" type="checkbox" <% if user.preferences.redirect_feed %>checked<% end %>>
|
|
|
|
</div>
|
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="max_results">Number of videos shown in feed: </label>
|
|
|
|
<input name="max_results" id="max_results" type="number" value="<%= user.preferences.max_results %>">
|
|
|
|
</div>
|
2018-07-17 06:01:49 +05:30
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="sort">Sort videos by: </label>
|
|
|
|
<select name="sort" id="sort">
|
|
|
|
<% ["published", "alphabetically", "alphabetically - reverse", "channel name", "channel name - reverse"].each do |option| %>
|
|
|
|
<option <% if user.preferences.sort == option %> selected <% end %>><%= option %></option>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</div>
|
2018-07-18 19:45:58 +05:30
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-control-group">
|
2018-07-29 07:10:59 +05:30
|
|
|
<label for="latest_only">Only show latest <% if user.preferences.unseen_only %>unseen<% end %> video from channel: </label>
|
2018-07-26 20:29:05 +05:30
|
|
|
<input name="latest_only" id="latest_only" type="checkbox" <% if user.preferences.latest_only %>checked<% end %>>
|
|
|
|
</div>
|
2018-07-18 19:45:58 +05:30
|
|
|
|
2018-07-29 07:10:59 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="unseen_only">Only show unseen: </label>
|
|
|
|
<input name="unseen_only" id="unseen_only" type="checkbox" <% if user.preferences.unseen_only %>checked<% end %>>
|
|
|
|
</div>
|
|
|
|
|
2018-07-31 21:14:07 +05:30
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="notifications_only">Only show notifications: </label>
|
|
|
|
<input name="notifications_only" id="notifications_only" type="checkbox" <% if user.preferences.notifications_only %>checked<% end %>>
|
|
|
|
</div>
|
|
|
|
|
2018-07-29 07:10:59 +05:30
|
|
|
<legend>Data preferences</legend>
|
2018-08-31 03:19:38 +05:30
|
|
|
|
2018-07-29 07:10:59 +05:30
|
|
|
<div class="pure-control-group">
|
2018-08-26 08:18:20 +05:30
|
|
|
<a href="/clear_watch_history?referer=<%= referer %>">Clear watch history</a>
|
2018-07-30 23:04:57 +05:30
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-control-group">
|
2018-08-26 08:18:20 +05:30
|
|
|
<a href="/data_control?referer=<%= referer %>">Import/Export data</a>
|
2018-08-06 06:29:45 +05:30
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-control-group">
|
2018-08-07 06:15:33 +05:30
|
|
|
<a href="/subscription_manager">Manage subscriptions</a>
|
2018-07-29 07:10:59 +05:30
|
|
|
</div>
|
|
|
|
|
2018-07-26 20:29:05 +05:30
|
|
|
<div class="pure-controls">
|
|
|
|
<button type="submit" class="pure-button pure-button-primary">Save preferences</button>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
2018-08-17 21:34:38 +05:30
|
|
|
</div>
|