b站直播样式,粉丝牌子样式优化

重置b站粉丝牌子的颜色样式,隐藏项目管理的任务

  1. // ==UserScript==
  2. // @name b站直播样式,粉丝牌子样式优化
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.3.5
  5. // @description 重置b站粉丝牌子的颜色样式,隐藏项目管理的任务
  6. // @author aotmd
  7. // @match https://live.bilibili.com/*
  8. // @match https://link.bilibili.com/p/center/*
  9. // @match https://www.bilibili.com/blackboard/live/*
  10. // @match
  11. // @noframes
  12. // @grant none
  13. // @license MIT
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. var setting={
  18. 聊天上下间距:0,
  19. 直播界面调整:true,
  20. 活动页面跳转原始页面:true,
  21. 粉丝牌子样式更改:true,
  22. 粉丝牌子圆角:true
  23. };
  24. //1.1.0更新内容,当发现有活动主题时,跳转到原始页面
  25. var Removeactivetopics=function Removeactivetopics(){
  26. var dot=document.getElementsByTagName("iframe");
  27. var regex=/live\.bilibili\.com\/blanc\/.+?liteVersion=true/;
  28. for(var i=0;i<dot.length;i++){
  29. if(regex.test(dot[i].src)){
  30. window.location.href=dot[i].src;
  31. }
  32. }
  33. };
  34. if(setting.活动页面跳转原始页面){
  35. setTimeout(Removeactivetopics,0);
  36. setTimeout(Removeactivetopics,5000);
  37. }
  38.  
  39. setInterval(() => {
  40. //1.2.3 删除因调整窗口导致无法正常隐藏的反馈按钮。
  41. var Feedback=document.querySelector("#js-player-decorator > div > div.bilibili-live-player-video-area > img");
  42. if(Feedback!=null)Feedback.remove();
  43. },1000);
  44. //自动下拉窗口
  45. window.onload=function (){
  46. setTimeout(function(){
  47. window.scrollTo(0,64);
  48. },0);
  49. };
  50. /*样式调整*/
  51. function addStyle(rules) {
  52. var styleElement = document.createElement('style');
  53. styleElement.type = 'text/css';
  54. document.getElementsByTagName('head')[0].appendChild(styleElement);
  55. styleElement.appendChild(document.createTextNode(rules));
  56. }
  57. if(setting.直播界面调整){
  58. addStyle(`
  59. /*1.0.0*/
  60. /*聊天栏宽度调整*/
  61. #aside-area-vm {
  62. width: 400px !important;
  63. right: -150px !important;
  64. }
  65.  
  66. /*调整排行榜:居中,元素宽度100%*/
  67. .tabs.isHundred {
  68. text-align: center;
  69. margin: 0 auto;
  70. }
  71. #rank-list-ctnr-box {
  72. width: 100%!important;
  73. }
  74.  
  75. /*调整视频区域位置与大小*/
  76. .live-room-app .app-content .app-body .player-and-aside-area .left-container {
  77. width: calc(100% - 212px - 12px)!important;
  78. right: 50px;
  79. }
  80.  
  81. /*----------下拉框调整----------*/
  82.  
  83. /*提示文字*/
  84. .guard-rank-cntr .rank-cntr .btn-box .guard-daily-record .board-icon+.daily-text {
  85. margin-top: -63px !important;
  86. }
  87. /*上船按钮*/
  88. button.bl-button.live-skin-highlight-text.live-skin-separate-area-hover.bl-button--primary.bl-button--size {
  89. left: -35px !important;
  90. top: -34px !important;
  91. }
  92. /*div位置调整*/
  93. .guard-daily-record.live-skin-main-text {
  94. margin-left: 52px;
  95. }
  96. /*航海之旅文字*/
  97. img.daily-record-title-img {
  98. left: 150px !important;
  99. }
  100. /*图标*/
  101. .guard-rank-cntr .rank-cntr .btn-box .guard-daily-record .board-icon {
  102. top: -18px !important;
  103. left: -277px !important;
  104. }
  105.  
  106. /*---------下拉框调整END---------*/
  107.  
  108. `);
  109. }
  110. if(setting.粉丝牌子样式更改){
  111. if(!setting.粉丝牌子圆角){
  112. addStyle(`
  113. /*1.3.5 去除圆角*/
  114. .fans-medal-item,.fans-medal-item::after {
  115. border-radius: unset!important;
  116. }
  117. `);
  118. }
  119. addStyle(`
  120. /*2233按钮位置调整*/
  121. .avatar-btn.pointer.a-scale-in-ease.model-22 {
  122. left: 150px;
  123. position: relative;
  124. }
  125. .avatar-btn.pointer.a-scale-in-ease.model-33 {
  126. left: 150px;
  127. position: relative;
  128. }
  129.  
  130. /*迷你播放器调整:删除圆角,全显示标题*/
  131. .live-player-ctnr.minimal {
  132. border-radius: 0;
  133. width: 1280px;
  134. height: 720px;
  135. }
  136. .live-player-ctnr.minimal:before {
  137. width: auto !important;
  138. }
  139.  
  140. /*背景高度调整*/
  141. .room-bg.p-fixed {
  142. max-height: 1080px !important;
  143. }
  144.  
  145. /*1.1.1优化辣条提示,不导致聊天区域上升*/
  146. div#penury-gift-msg {
  147. max-height: 26px;
  148. bottom: 18px;
  149. }
  150. div#chat-history-list {
  151. height: 100%
  152. }
  153. /*1.1.3减慢礼物提示动画速度*/
  154. .penury-gift-item.v-middle.a-move-in-top {
  155. -webkit-animation: move-in-top cubic-bezier(.22,.58,.12,.50) 0.8s;
  156. animation:move-in-top cubic-bezier(.22,.58,.12,.50) 0.8s;
  157. }
  158. /*1.1.4舰长margin、背景、标志、边框、名字高亮、padding消除*/
  159. .chat-history-panel .chat-history-list .chat-item.danmaku-item.chat-colorful-bubble {
  160. margin: 0!important;
  161. background-color: transparent!important;
  162. }
  163. .fans-medal-item.medal-guard{
  164. margin-left:0px!important;
  165. border-color: #769fd2!important
  166. }
  167. i.medal-deco.medal-guard{
  168. display: none!important;
  169. }
  170. .fans-medal-item .fans-medal-label.medal-guard{
  171. padding-left: 4px!important;
  172. }
  173. .chat-colorful-bubble span.user-name.v-middle.pointer.open-menu{
  174. color: #aaa!important;
  175. }
  176. /*1.1.5 屏蔽进场,关注,分享,特别关注等信息提示*/
  177. .chat-item.important-prompt-item{
  178. display: none;
  179. }
  180. /*1.1.6 屏蔽进场信息*/
  181. div#brush-prompt {
  182. display: none;
  183. }
  184.  
  185. /*1.2.0覆盖牌子颜色*/
  186. /*1-4级*/
  187. .fans-medal-label[style*="#5c968e"],.fans-medal-label[style*="rgb(92, 150, 142)"]{
  188. background-image: linear-gradient(45deg, #268420 -50%, #3fef31 100%)!important;
  189. }
  190. .fans-medal-level[style*="#5c968e"],.fans-medal-level[style*="rgb(92, 150, 142)"]{
  191. color: #268420!important;
  192. }
  193. .fans-medal-item[style*="#5c968e"],.fans-medal-item[style*="rgb(92, 150, 142)"]{
  194. border-color:#268420!important;
  195. }
  196.  
  197. /*5-8级*/
  198. .fans-medal-label[style*="#5d7b9e"],.fans-medal-label[style*="rgb(93, 123, 158)"]{
  199. background-image: linear-gradient(45deg, #145fb5 0%, #5896DE 100%)!important;
  200. }
  201. .fans-medal-level[style*="#5d7b9e"],.fans-medal-level[style*="rgb(93, 123, 158)"]{
  202. color: #5896DE!important;
  203. }
  204. .fans-medal-item[style*="#5d7b9e"],.fans-medal-item[style*="rgb(93, 123, 158)"]{
  205. border-color:#5896DE!important;
  206. }
  207.  
  208. /*9-12级*/
  209. .fans-medal-label[style*="#8d7ca6"],.fans-medal-label[style*="rgb(141, 124, 166)"]{
  210. background-image: linear-gradient(45deg, #6a4c96 0%, #a068f1 100%)!important;
  211. }
  212. .fans-medal-level[style*="#8d7ca6"],.fans-medal-level[style*="rgb(141, 124, 166)"]{
  213. color: #a068f1!important;
  214. }
  215. .fans-medal-item[style*="#8d7ca6"],.fans-medal-item[style*="rgb(141, 124, 166)"]{
  216. border-color:#a068f1!important;
  217. }
  218.  
  219. /*13-16级*/
  220. .fans-medal-label[style*="#be6686"],.fans-medal-label[style*="rgb(190, 102, 134)"]{
  221. background-image: linear-gradient(45deg, #ef3c7b -50%, #FF86B2 100%)!important;
  222. }
  223. .fans-medal-level[style*="#be6686"],.fans-medal-level[style*="rgb(190, 102, 134)"]{
  224. color: #FF86B2!important;
  225. }
  226. .fans-medal-item[style*="#be6686"],.fans-medal-item[style*="rgb(190, 102, 134)"]{
  227. border-color:#FF86B2!important;
  228. }
  229.  
  230. /*17-20级*/
  231. .fans-medal-label[style*="#DC6B6B99"],.fans-medal-label[style*="rgb(199, 157, 36)"]{
  232. background-image: linear-gradient(45deg, #F6BE18 0%, #ffd045 100%)!important;
  233. }
  234. .fans-medal-level,.fans-medal-level[style*="rgb(199, 157, 36)"]{
  235. color: #F6BE18!important;
  236. }
  237. .fans-medal-item[style*="#DC6B6B99"],.fans-medal-item[style*="rgb(199, 157, 36)"]{
  238. border-color:#F6BE18!important;
  239. background-image: linear-gradient(45deg, #F6BE18 0%, #ffd045 100%)!important;
  240. }
  241. /*1.2.2 隐藏高能提示*/
  242. .top3-notice.chat-item {
  243. display: none!important;
  244. }
  245. /*1.2.3 隐藏系统提示*/
  246. .chat-item.convention-msg.border-box {
  247. display: none;
  248. }
  249. /*1.2.3 隐藏热榜提示*/
  250. .chat-item.hot-rank-msg {
  251. display: none;
  252. }
  253. /*1.2.7 设置弹幕为全屏*/
  254. .danmaku-item-container {
  255. width: auto!important;
  256. height: 100%!important;
  257. }
  258. /*1.2.8 补全粉丝牌子border*/
  259. .fans-medal-item {
  260. border-left: 1px solid!important;
  261. }
  262. /*1.2.9 聊天列表闪动修复*/
  263. div#chat-history-list {
  264. height: 100%!important;
  265. }
  266. /*1.3.1 屏蔽参加活动提示*/
  267. .chat-item.common-danmuku-msg.border-box {
  268. display: none;
  269. height: 0px;
  270. margin: 0px!important;
  271. }
  272. /*1.3.2 屏蔽使用APP提示*/
  273. .shop-popover {
  274. display: none;
  275. }
  276. /*1.3.3 屏蔽荣誉等级,在粉丝勋章左边*/
  277. .wealth-medal-ctnr.fans-medal-item-target.dp-i-block.p-relative.v-middle {
  278. display: none;
  279. }
  280. `);
  281. }
  282. /*1.1.2 调整聊天上下间距*/
  283. addStyle(".chat-history-panel .chat-history-list .chat-item{padding: "+setting.聊天上下间距+"px 5px !important;}");
  284. })();

QingJ © 2025

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