Greasy Fork

Greasy Fork is available in English.

阅读悦小说,在线收听,自动下一页

2021/9/29 下午4:11:29

当前为 2021-09-30 提交的版本,查看 最新版本

// ==UserScript==
// @name        阅读悦小说,在线收听,自动下一页
// @namespace   Violentmonkey Scripts
// @match        *://www.yuedyue.com/*
// @grant       none
// @version     1.1
// @author      -
// @description 2021/9/29 下午4:11:29
// ==/UserScript==
(function () {
  'use strict';
  
  var audiomp3 = document.getElementsByTagName("audio")[0]
  if (audiomp3){
    var statusclock = setInterval(status,1000)
    var intclock = setInterval(clock,1000 * 10)

    function status(){
      if (audiomp3.readyState){
        audiomp3.playbackRate = 1.25
        audiomp3.play()
        window.clearInterval(statusclock)
      }
    }

    function clock(){
      console.log(audiomp3.currentTime)
      console.log(audiomp3.duration)
      audiomp3.playbackRate = 1.25
      if (audiomp3.duration == audiomp3.currentTime){
        var read_dwn = document.getElementsByClassName("read_dwn")[0].children[0].childNodes[3]
        read_dwn.click()
      }
    }
  }
  
  
  
})()