mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 11:28:51 +00:00
Add 'continue_autoplay' preference
This commit is contained in:
@@ -55,13 +55,13 @@ function get_playlist(timeouts = 0) {
|
||||
location.assign("/embed/"
|
||||
+ xhr.response.nextVideo
|
||||
+ "?list=<%= plid %>"
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% if params[:listen] != preferences.listen %>
|
||||
+ "&listen=<%= params[:listen] %>"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
<% if params[:autoplay] || params[:continue_autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
<% if params[:speed] != preferences.speed %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
@@ -85,13 +85,13 @@ player.on('ended', function() {
|
||||
<% if !video_series.empty? %>
|
||||
+ "?playlist=<%= video_series.join(",") %>"
|
||||
<% end %>
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% if params[:listen] != preferences.listen %>
|
||||
+ "&listen=<%= params[:listen] %>"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
<% if params[:autoplay] || params[:continue_autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
<% if params[:speed] != preferences.speed %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
|
||||
@@ -24,10 +24,15 @@ function update_value(element) {
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="continue"><%= translate(locale, "Autoplay next video: ") %></label>
|
||||
<label for="continue"><%= translate(locale, "Play next by default: ") %></label>
|
||||
<input name="continue" id="continue" type="checkbox" <% if preferences.continue %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="continue_autoplay"><%= translate(locale, "Autoplay next video: ") %></label>
|
||||
<input name="continue_autoplay" id="continue_autoplay" type="checkbox" <% if preferences.continue_autoplay %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="local"><%= translate(locale, "Proxy videos? ") %></label>
|
||||
<input name="local" id="local" type="checkbox" <% if preferences.local %>checked<% end %>>
|
||||
|
||||
@@ -202,13 +202,13 @@ player.on('ended', function() {
|
||||
location.assign("/watch?v="
|
||||
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
||||
+ "&continue=1"
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% if params[:listen] != preferences.listen %>
|
||||
+ "&listen=<%= params[:listen] %>"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
<% if params[:autoplay] || params[:continue_autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
<% if params[:speed] != preferences.speed %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
@@ -221,13 +221,13 @@ function continue_autoplay(target) {
|
||||
location.assign("/watch?v="
|
||||
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
|
||||
+ "&continue=1"
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% if params[:listen] != preferences.listen %>
|
||||
+ "&listen=<%= params[:listen] %>"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
<% if params[:autoplay] || params[:continue_autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
<% if params[:speed] != preferences.speed %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
@@ -287,13 +287,13 @@ function get_playlist(timeouts = 0) {
|
||||
location.assign("/watch?v="
|
||||
+ xhr.response.nextVideo
|
||||
+ "&list=<%= plid %>"
|
||||
<% if params[:listen] %>
|
||||
+ "&listen=1"
|
||||
<% if params[:listen] != preferences.listen %>
|
||||
+ "&listen=<%= params[:listen] %>"
|
||||
<% end %>
|
||||
<% if params[:autoplay] %>
|
||||
<% if params[:autoplay] || params[:continue_autoplay] %>
|
||||
+ "&autoplay=1"
|
||||
<% end %>
|
||||
<% if params[:speed] %>
|
||||
<% if params[:speed] != preferences.speed %>
|
||||
+ "&speed=<%= params[:speed] %>"
|
||||
<% end %>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user