mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
4.2 KiB
JavaScript
1 line
4.2 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["feeds/extend-live"]=t():e["feeds/extend-live"]=t()}(self,(function(){return function(){"use strict";var e,t,n={277:function(e,t,n){n.r(t),t.default='// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require("../../../../../node_modules/css-loader/dist/runtime/api.js");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ".live-up-list {\\n max-height: calc(100vh - 380px);\\n overflow: auto;\\n scrollbar-width: none !important;\\n overscroll-behavior: contain;\\n}\\nbody.feeds-filter-side-block-profile .live-up-list {\\n max-height: calc(100vh - 180px);\\n}\\n.live-up-list::-webkit-scrollbar {\\n height: 0 !important;\\n width: 0 !important;\\n}\\n.live-up-list .live-detail[data-live-title] {\\n color: black;\\n}\\nbody.dark .live-up-list .live-detail[data-live-title] {\\n color: #eee;\\n}\\n.live-up-list .live-detail[data-live-title] .up-name {\\n font-size: 13px !important;\\n opacity: 0.6;\\n}\\n.live-up-list .live-detail[data-live-title]::before {\\n content: attr(data-live-title);\\n color: black;\\n line-height: 1.5;\\n display: block;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\nbody.dark .live-up-list .live-detail[data-live-title]::before {\\n color: #eee;\\n}", ""]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n'},663:function(e){e.exports=coreApis.ajax},30:function(e){e.exports=coreApis.componentApis.feeds.disableProfilePopup},569:function(e){e.exports=coreApis.spinQuery}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,o),r.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var l={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){l[e]=function(){return n[e]}}));return l.default=function(){return n},o.d(r,l),r},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){o.d(r,{component:function(){return e}});const e={name:"extendFeedsLive",displayName:"直播信息扩充",description:{"zh-CN":"在动态的`正在直播`中, 为每一个直播间加上标题, 并且能够显示超过10个的直播间."},entry:(0,coreApis.componentApis.styledComponent.styledComponentEntry)((()=>Promise.resolve().then(o.bind(o,277))),(async()=>{const{select:e}=await Promise.resolve().then(o.t.bind(o,569,23)),t=await e(".live-up-list");if(null===t)return;const{getPages:n,getJsonWithCredentials:i}=await Promise.resolve().then(o.t.bind(o,663,23)),r=await n({api:e=>i(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${e}&pagesize=24`),getList:e=>lodash.get(e,"data.list",[]),getTotal:e=>lodash.get(e,"data.results",0)}),l=dqa(t,".up-name").map((e=>e.innerText.trim())),a=r.filter((e=>l.includes(e.uname))),s=r.filter((e=>!l.includes(e.uname))),c=t.children[0];s.forEach((e=>{if(dqa(t,".up-name").some((t=>t.innerText.trim()===e.uname)))return;const n=c.cloneNode(!0);dqa(n,"a[href]").forEach((t=>t.setAttribute("href",`https://live.bilibili.com/${e.roomid}`)));dq(n,".live-up-img").style.backgroundImage=`url(${e.face})`;const i=dq(n,".live-name");i.innerHTML=e.title,i.title=e.title;const o=dq(n,".up-name");o.innerHTML=e.uname,o.title=e.uname,t.insertAdjacentElement("beforeend",n)}));const{disableProfilePopup:d}=await Promise.resolve().then(o.t.bind(o,30,23));d(),console.log(a,s)})),tags:[componentsTags.feeds,componentsTags.live],urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],commitHash:"0a2ab779aac2af6f58d15cee16533dd18200bb62"}}(),r=r.component}()})); |