Use location.assign instead of window.location.replace

This commit is contained in:
Omar Roth 2019-01-05 23:02:03 -06:00
parent 81c2ecc788
commit c6ec8317ac
1 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@
<script>
<% if !rvs.empty? && !plid && params[:continue] %>
player.on('ended', function() {
window.location.replace("/watch?v="
location.assign("/watch?v="
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
+ "&continue=1"
<% if params[:listen] %>
@ -198,7 +198,7 @@ player.on('ended', function() {
function continue_autoplay(target) {
if (target.checked) {
player.on('ended', function() {
window.location.replace("/watch?v="
location.assign("/watch?v="
+ "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>"
+ "&continue=1"
<% if params[:listen] %>
@ -295,7 +295,7 @@ function get_playlist() {
if (xhr.response.nextVideo) {
player.on('ended', function() {
window.location.replace("/watch?v="
location.assign("/watch?v="
+ xhr.response.nextVideo
+ "&list=<%= plid %>"
<% if params[:listen] %>