Move Youtube subtitle to the bottom of the viewport

Have you never been annoyed by youtube subtitles covering the video frame (and potentially other )? I made this script to push them to the bottom of the viewport

目前為 2019-10-01 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Move Youtube subtitle to the bottom of the viewport
  3. // @namespace https://gillesfiguiere.com/
  4. // @version 0.1
  5. // @description Have you never been annoyed by youtube subtitles covering the video frame (and potentially other )? I made this script to push them to the bottom of the viewport
  6. // @author Gilles Figuière
  7. // @match https://www.youtube.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. document.querySelectorAll("#movie_player").forEach(element => {
  15.  
  16. const observer = new MutationObserver(mutations => {
  17. console.log(mutations)
  18. mutations.forEach(mutation => {
  19. mutation.target.querySelectorAll(".caption-window").forEach(subtitlesPlaceHolder => {
  20. subtitlesPlaceHolder.style.position = "fixed"
  21. subtitlesPlaceHolder.style.bottom = "0"
  22. })
  23. })
  24. })
  25.  
  26. observer.observe(element, {childList: true})
  27. })
  28.  
  29. })();

QingJ © 2025

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