// ==UserScript== // @name bilibili动态首页布局优化 // @namespace http://tampermonkey.net/ // @version 0.1.4 // @description 改变哔哩哔哩动态首页布局 // @author tuntun // @match https://t.bilibili.com/* // @icon https://www.google.com/s2/favicons?domain=bilibili.com // @grant GM_addStyle // @license MIT // @downloadURL none // ==/UserScript== (function () { "use strict"; let styleStr = ` .home-content { width: 1524px !important; } .center-panel { width: 1272px !important; } .right-panel { // width: 244px !important; display: none !important; } .content { display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; width:100% !important; } .content .card[data-v-76c52272] { width: 50% !important; height: calc(100% - 8px) !important; margin-top: 8px !important; } .content .card[data-v-76c52272]:nth-of-type(1) { margin-top: 0px !important; } .content .card[data-v-76c52272]:nth-of-type(2) { margin-top: 0px !important; } .new-notice-bar { margin-top: 8px !important; margin-bottom: 8px !important; flex-basis:100% !important; } .content>div{ width: 632px !important; } @media screen and (min-width: 1921px) { .home-content[data-v-d112ac46] { /* width: auto !important;*/ width: 1524px !important; } } @media screen and (min-width: 1921px) { .home-content .center-panel[data-v-d112ac46] { width: 1272px !important;; } } ` let body = document.body; let styleDom = document.createElement('style'); styleDom.id = 'tuntun-bilibili-index' styleDom.innerHTML = styleStr; body.appendChild(styleDom); })();