YouTube Normal Thumbnails

Restores normal thumbnails size

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

  1. // ==UserScript==
  2. // @name YouTube Normal Thumbnails
  3. // @namespace http://gf.qytechs.cn
  4. // @version 0.2
  5. // @description Restores normal thumbnails size
  6. // @author NeoCortex
  7. // @match https://www.youtube.com/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. const target = document.querySelector('ytd-rich-grid-renderer'),
  13. config = {
  14. attributes: true,
  15. childList: false,
  16. subtree: false
  17. },
  18. fixStyle = function() {
  19. target.style.cssText =
  20. target.style.cssText.replace(
  21. /\-\-ytd\-rich\-grid\-items\-per\-row\:\s*\d{1,3}\;/,
  22. '--ytd-rich-grid-items-per-row: 5;'
  23. );
  24. },
  25. callback = function(mutationsList, observer) {
  26. for (let mutation of mutationsList) {
  27. if (mutation.attributeName == 'style') {
  28. observer.disconnect();
  29. fixStyle();
  30. observer.observe(target, config);
  31. }
  32. }
  33. };
  34.  
  35. fixStyle();
  36. const observer = new MutationObserver(callback);
  37. observer.observe(target, config);
  38.  
  39. var s = document.createElement('style');
  40. s.innerHTML = 'ytd-rich-grid-video-renderer[mini-mode] #video-title.ytd-rich-grid-video-renderer {font-size: 1.3rem;}';
  41. document.body.appendChild(s);
  42. })();

QingJ © 2025

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