audioplayer.js 756 B

12345678910111213141516171819202122232425
  1. /* @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 */
  2. /* auto next */
  3. if (total_pages > 1) {
  4. document.getElementById('continue').checked = ato
  5. document.getElementById('continue').addEventListener('click', function () {
  6. var url = '/video/' + current_vid + ':' + idx + '?listen=0'
  7. if (document.getElementById('continue').checked)
  8. url += '&ato=1'
  9. document.getElementById('avswitch').href = url
  10. })
  11. document.getElementById('player').addEventListener('ended', function () {
  12. if (!document.getElementById('continue').checked)
  13. return
  14. if (++idx == total_pages)
  15. return
  16. window.location.href = '/video/' + current_vid + ':' + idx + '?listen=1&ato=1'
  17. })
  18. }
  19. /* @license-end */