【哔哩哔哩】修改选集列表框高度

默认的高度也太小了吧!

  1. // ==UserScript==
  2. // @name 【哔哩哔哩】修改选集列表框高度
  3. // @version 0.2.2
  4. // @description 默认的高度也太小了吧!
  5. // @icon https://static.hdslb.com/images/favicon.ico
  6. // @match https://www.bilibili.com/video/*
  7. // @grant GM_addStyle
  8. // @grant GM_registerMenuCommand
  9. // @grant GM_setValue
  10. // @grant GM_getValue
  11. // @run-at document-start
  12. // @namespace https://github.com/AkagiYui/UserScript
  13. // @supportURL https://github.com/AkagiYui/UserScript/issues
  14. // @homepage https://github.com/AkagiYui
  15. // @author AkagiYui
  16. // @license MIT
  17. // ==/UserScript==
  18.  
  19. /******/ (() => { // webpackBootstrap
  20. /******/ "use strict";
  21. var __webpack_exports__ = {};
  22.  
  23. let maxHeight = GM_getValue("maxHeight", "340px");
  24. GM_registerMenuCommand("修改高度值", function () {
  25. const userValue = prompt("请输入高度值:", maxHeight);
  26. if (userValue !== null) {
  27. maxHeight = userValue;
  28. GM_setValue("maxHeight", maxHeight);
  29. updateStyles();
  30. }
  31. });
  32. // base-video-sections-v1: 带封面的视频列表
  33. // video-sections-v1: 普通视频列表
  34. function updateStyles() {
  35. GM_addStyle(`
  36. .base-video-sections-v1, .video-sections-v1 {
  37. .video-sections-content-list {
  38. height: auto !important;
  39. max-height: ${maxHeight} !important;
  40. }
  41. }
  42. .multi-page-v1 .cur-list {
  43. max-height: ${maxHeight} !important;
  44. }
  45. .video-pod__body {
  46. max-height: ${maxHeight} !important;
  47. }
  48. `);
  49. }
  50. updateStyles();
  51.  
  52. /******/ })()
  53. ;

QingJ © 2025

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