Greasy Fork

Greasy Fork is available in English.

get超星听力进度条

try to take over the world!

目前为 2020-03-31 提交的版本。查看 最新版本

// ==UserScript==
// @name         get超星听力进度条
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        *://*.chaoxing.com/work*
// @grant        none
// ==/UserScript==
'use strict'
function main () {
    var audioIFrames = document.getElementsByClassName('ans-insertaudio-module')
    for (var iframe of audioIFrames) {
        iframe.style.width = '100%'
        var iframeDoucment = iframe.contentDocument
        var audio = iframeDoucment.getElementsByTagName('audio')[0]
        var style = audio.style
        style.width = '100%'
        style.height = '30px'
        style.visibility = ''
        var body = iframeDoucment.getElementsByTagName('body')[0]
        var reader = body.getElementsByTagName('div')[0]
        body.replaceChild(audio, reader)
    }
}
window.onload = ()=> {
    setTimeout(main, 500)
}