Greasy Fork镜像 支持简体中文。

Youtube caption selector

make youtube caption can be selected

  1. // ==UserScript==
  2. // @name Youtube caption selector
  3. // @name:en Youtube caption selector
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.1
  6. // @description make youtube caption can be selected
  7. // @author Kirie
  8. // @match https://www.youtube.com/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
  10. // @require https://cdn.staticfile.org/jquery/3.5.0/jquery.min.js
  11. // @grant GM_addStyle
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. // Your code here...
  19. $(document).ready(function() {
  20. var timer = setInterval(function() {
  21. if(document.querySelector('.ytp-caption-window-container') == null) {
  22. console.log('null');
  23. }
  24. else {
  25. // console.log(document.querySelector('.ytp-caption-window-container'));
  26. GM_addStyle(`
  27. .caption-window {
  28. position: absolute;
  29. line-height: normal;
  30. z-index: 40;
  31. pointer-events: auto;
  32. cursor: move;
  33. cursor: -webkit-grab;
  34. cursor: -moz-grab;
  35. cursor: text;
  36. -moz-user-select: none;
  37. -ms-user-select: none;
  38. -webkit-user-select: text;
  39. }
  40. `);
  41. clearInterval(timer);
  42. }
  43. },1000);
  44.  
  45.  
  46. });
  47. })();

QingJ © 2025

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