Show zh-CN Subtitles for Coursera

Show Single zh-CN subtitles when you're watching coursera, and you may modify the script manually as you like!

  1. // ==UserScript==
  2. // @name Show zh-CN Subtitles for Coursera
  3. // @name:zh 于 Coursera 显示中文(简体)字幕
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.0
  6. // @description Show Single zh-CN subtitles when you're watching coursera, and you may modify the script manually as you like!
  7. // @description:zh 在 Coursera 显示中文(简体)字幕,或手动更改脚本来更换其它语言
  8. // @author Franklin Li
  9. // @include http://www.coursera.org/*
  10. // @include https://www.coursera.org/*
  11. // @grant none
  12. // @run-at document-end
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. setInterval(function(){
  19. var video = document.getElementById("c-video_html5_api");
  20. if(video){
  21. var n = video.textTracks;
  22. var bsubtitleoff = true;
  23. for (var o = 0; o < n.length; o++) {
  24. var i = n[o];
  25. if (i.kind !== "subtitles") continue;
  26. if (i.language == "zh-CN") i.mode = "showing";
  27. }
  28. }
  29. },500);
  30. })();

QingJ © 2025

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