mirror of
https://github.com/iv-org/invidious.git
synced 2026-02-17 05:56:07 +00:00
Add title listen button time updates (#5625)
Some checks are pending
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Waiting to run
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Waiting to run
Invidious CI / build - crystal: 1.14.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.15.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.16.3, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.17.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.18.2, stable: true (push) Waiting to run
Invidious CI / build - crystal: nightly, stable: false (push) Waiting to run
Invidious CI / Test AMD64 Docker build (push) Waiting to run
Invidious CI / Test ARM64 Docker build (push) Waiting to run
Invidious CI / lint (push) Waiting to run
Some checks are pending
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Waiting to run
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Waiting to run
Invidious CI / build - crystal: 1.14.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.15.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.16.3, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.17.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.18.2, stable: true (push) Waiting to run
Invidious CI / build - crystal: nightly, stable: false (push) Waiting to run
Invidious CI / Test AMD64 Docker build (push) Waiting to run
Invidious CI / Test ARM64 Docker build (push) Waiting to run
Invidious CI / lint (push) Waiting to run
When switching between Listen and Watching the timestamp in the url of the listen of watch button is now updated automatically. This means if you switch between listening and viewing you keep in sync with time.
This commit is contained in:
@@ -166,6 +166,12 @@ player.on('timeupdate', function () {
|
|||||||
let base_url_iv_other = elem_iv_other.getAttribute('data-base-url');
|
let base_url_iv_other = elem_iv_other.getAttribute('data-base-url');
|
||||||
elem_iv_other.href = addCurrentTimeToURL(base_url_iv_other, domain);
|
elem_iv_other.href = addCurrentTimeToURL(base_url_iv_other, domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let elem_iv_listen = document.getElementById('link-iv-listen');
|
||||||
|
if (elem_iv_listen) {
|
||||||
|
let base_url_iv_listen = elem_iv_listen.getAttribute('data-base-url');
|
||||||
|
elem_iv_listen.href = addCurrentTimeToURL(base_url_iv_listen, domain);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -79,11 +79,11 @@ we're going to need to do it here in order to allow for translations.
|
|||||||
<h1>
|
<h1>
|
||||||
<%= title %>
|
<%= title %>
|
||||||
<% if params.listen %>
|
<% if params.listen %>
|
||||||
<a title="<%=translate(locale, "Video mode")%>" href="/watch?<%= env.params.query %>&listen=0">
|
<a title="<%=translate(locale, "Video mode")%>" id="link-iv-listen" data-base-url="/watch?<%= env.params.query %>&listen=0" href="/watch?<%= env.params.query %>&listen=0">
|
||||||
<i class="icon ion-ios-videocam"></i>
|
<i class="icon ion-ios-videocam"></i>
|
||||||
</a>
|
</a>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?<%= env.params.query %>&listen=1">
|
<a title="<%=translate(locale, "Audio mode")%>" id="link-iv-listen" data-base-url="/watch?<%= env.params.query %>&listen=1" href="/watch?<%= env.params.query %>&listen=1">
|
||||||
<i class="icon ion-md-headset"></i>
|
<i class="icon ion-md-headset"></i>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user