Udemy Translate

try to take over the world!

目前为 2020-12-04 提交的版本。查看 最新版本

// ==UserScript==
// @name         Udemy Translate
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        <$URL$>
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    if (typeof window.i !== 'undefined') { clearInterval(window.i) } else {
        let lastText = ''
        function check() {
            let toEl = $('.well--container--2edq4 span');
            let fromEl = $('p[data-purpose="transcript-cue-active"] span')
            let currentText = fromEl.html()
            if (lastText !== currentText) {
                toEl.html(currentText);
            }
            lastText = fromEl.html()
        }
        window.i = setInterval(check, 200);
}
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址