Move autoplay button below player to the left
Agent-Logs-Url: https://github.com/mkelvers/mal/sessions/cb3492f9-64b6-4d16-9c7b-11d9e2c647c3 Co-authored-by: melosh101 <59763532+melosh101@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
77be47297f
commit
03145d05b1
@@ -182,8 +182,14 @@ const initPlayer = (): void => {
|
||||
const updateAutoplayButton = (): void => {
|
||||
if (!autoplayBtn) return
|
||||
const enabled = isAutoplayEnabled()
|
||||
autoplayBtn.title = enabled ? 'Autoplay: On' : 'Autoplay: Off'
|
||||
autoplayBtn.classList.toggle('opacity-40', !enabled)
|
||||
const label = enabled ? 'Autoplay: On' : 'Autoplay: Off'
|
||||
autoplayBtn.title = label
|
||||
autoplayBtn.classList.remove('opacity-40', 'opacity-50')
|
||||
if (!enabled) autoplayBtn.classList.add('opacity-50')
|
||||
const lastChild = autoplayBtn.lastChild
|
||||
if (lastChild && lastChild.nodeType === Node.TEXT_NODE) {
|
||||
lastChild.textContent = label
|
||||
}
|
||||
}
|
||||
|
||||
const timelineBounds = (): { start: number, end: number, duration: number } => {
|
||||
|
||||
Reference in New Issue
Block a user