bilibili动态首页布局优化

改变哔哩哔哩动态首页布局

  1. // ==UserScript==
  2. // @name bilibili动态首页布局优化
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2.0
  5. // @description 改变哔哩哔哩动态首页布局
  6. // @author tuntun
  7. // @match https://t.bilibili.com/*
  8. // @icon https://www.google.com/s2/favicons?domain=bilibili.com
  9. // @grant GM_addStyle
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. "use strict";
  15. let styleStr = `
  16. .bili-dyn-home--member {
  17. width: 1524px !important;
  18. }
  19.  
  20. main {
  21. width: 1272px !important;
  22. }
  23.  
  24. aside[class="right"] {
  25. display: none !important;
  26. }
  27.  
  28. .most-viewed-panel {
  29. margin-bottom: 8px !important;
  30. }
  31.  
  32. .bili-dyn-list__items {
  33. display: flex !important;
  34. flex-wrap: wrap !important;
  35. justify-content: space-between !important;
  36. width: 100% !important;
  37. }
  38.  
  39. .bili-dyn-list__item {
  40. width: calc(50% - 4px) !important;
  41. /* margin-right: 8px !important; */
  42. }
  43.  
  44. .bili-dyn-list__item .bili-dyn-item {
  45. width: calc(50% - 4px) !important;
  46. height: calc(100%) !important;
  47. }
  48.  
  49. .bili-dyn-list__notification {
  50. margin-top: 8px !important;
  51. flex-basis:100% !important;
  52. }
  53.  
  54. @media screen and (min-width: 1921px) {
  55. .bili-dyn-home--member {
  56. width: 1524px !important;
  57. }
  58. }
  59.  
  60. @media screen and (min-width: 1921px) {
  61. main {
  62. width: 1272px !important;;
  63. }
  64. }
  65. `
  66. let body = document.body;
  67. let styleDom = document.createElement('style');
  68. styleDom.id = 'tuntun-bilibili-index'
  69. styleDom.innerHTML = styleStr;
  70. body.appendChild(styleDom);
  71. })();