小鹅通倍速播放

小鹅通倍速播放,支持到 4 倍速

目前为 2021-10-10 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @icon http://wechatapppro-1252524126.file.myqcloud.com/apppuKyPtrl1086/image/kblzqm3w07gcrw7zvlir.jpg
  3. // @name 小鹅通倍速播放
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.1
  6. // @description 小鹅通倍速播放,支持到 4 倍速
  7. // @author Bamboo
  8. // @include /^http(s?)://*.pc.xiaoe-tech.com/**$/
  9. // @match *://*.pc.xiaoe-tech.com/*
  10. // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
  11. // @run-at document-end
  12. // ==/UserScript==
  13. var website_url = window.location.href || document.location.href;
  14. var website_host = window.location.host || document.location.host;
  15.  
  16. ; (function () {
  17. 'use strict';
  18.  
  19. setTimeout(function () {
  20. $(document).ready(function () {
  21. console.log('小etong........')
  22. let prepend3Html = '<li class="vjs-menu-item" tabindex="-1" role="menuitemradio" aria-disabled="false" aria-checked="false"><span class="vjs-menu-item-text">3x</span><span class="vjs-control-text" aria-live="polite"></span></li>';
  23. let prepend35Html = '<li class="vjs-menu-item" tabindex="-1" role="menuitemradio" aria-disabled="false" aria-checked="false"><span class="vjs-menu-item-text">3.5x</span><span class="vjs-control-text" aria-live="polite"></span></li>';
  24. let prepend4Html = '<li class="vjs-menu-item" tabindex="-1" role="menuitemradio" aria-disabled="false" aria-checked="false"><span class="vjs-menu-item-text">4x</span><span class="vjs-control-text" aria-live="polite"></span></li>';
  25. $('.vjs-menu-content').prepend(prepend3Html);
  26. $('.vjs-menu-content').prepend(prepend35Html);
  27. $('.vjs-menu-content').prepend(prepend4Html);
  28.  
  29. $('.vjs-menu-content').on('click', 'li', function(e) {
  30. $(this).siblings().each(function(){
  31. if($(this).hasClass('vjs-selected')){
  32. $(this).removeClass('vjs-selected');
  33. $(this).attr('aria-checked', false);
  34. $(this).children('.vjs-control-text').text('')
  35. }
  36. });
  37.  
  38. $(this).addClass('vjs-selected');
  39. $(this).attr('aria-checked', true);
  40. $(this).children('.vjs-control-text').text(', selected')
  41. $('#xiaoe-new-player-style .vjs-playback-rate .vjs-menu-content li.vjs-selected').css('color', '#FFF');
  42. document.querySelector("video").playbackRate = $(this).children('.vjs-menu-item-text').text().replace('x', '');
  43. $('.vjs-playback-rate-value').text($(this).children('.vjs-menu-item-text').text());
  44. document.querySelector("video").play();
  45. console.log('当前播放速度是:', document.querySelector("video").playbackRate)
  46. });
  47.  
  48. });
  49. }, 5000);
  50. })();

QingJ © 2025

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