Support download modal hook

This commit is contained in:
Chocobozzz 2021-03-23 11:59:43 +01:00
parent a5d852cafd
commit 329f8a1182
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 13 additions and 0 deletions

View File

@ -64,6 +64,19 @@ function register ({ registerHook, peertubeHelpers }) {
handler: params => console.log('New URL! %s.', params.path)
})
// Modal hooks
registerHook({
target: 'action:modal.video-download.shown',
handler: () => {
console.log('Video download modal shown')
document.getElementById('download-torrent').checked = true
document.getElementById('download-direct').parentElement.style.display = 'none'
}
})
// Fake hook
registerHook({