Merge pull request #695 from shugen002/preview

Remove Live Title Extend in dynamic
This commit is contained in:
Grant Howard 2020-07-03 00:35:18 +08:00 committed by GitHub
commit 78eb39ffdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 13219 additions and 13235 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@
"custom-control-background.min.js": "B9F366B251D1572ACE801FF6ECF15D4D1AAB3EA5A5B04B961B6F4310E2AB1A84",
"custom-navbar.min.css": "E203AC951B2D5B3C81061E3C90D748C6F6E3453DB25EE376E495E3AB6A115C81",
"custom-navbar.min.html": "183B1F7182633044CCB20A3710524492118308CF55915AA9AA9F36850500F457",
"custom-navbar.min.js": "36416168F37791651C0533EDE4348A510A3160443DFA0BFD332BB9685EF52CA7",
"custom-navbar.min.js": "8888673643638D68BC174153D58BBDF5A09E77515976578618553A35F783DD23",
"custom-navbar-activities.min.js": "23CED08D224447A793F8B85433EFACA2C151034A025EB9D3B427101C2AFD16AF",
"custom-navbar-blank.min.js": "DC2B75D5760EECD3A257785FDFBB7E5DEBF61CD9083C68DD5BCE468B093F54F3",
"custom-navbar-category.min.js": "2D1A6189540E5DE22A9741AFCFDA2FED50EA960B129547B1E756F2D5E53C0C67",
@ -58,12 +58,11 @@
"danmaku-send-bar.min.css": "52149D46CF3A15CF6EB186CB49F298DE18B0723E52D8693228F66099847EDCCB",
"danmaku-send-bar.min.js": "7108E72F00C169F26E20409F4AA79F05553310375BABC392EB7E2166224B800A",
"dark.min.css": "AE3CAEA9A0A898B017E0E43CFB0F9487651F1B3ADBCC0A3C04B1E1462CD3617C",
"dark.user.css": "CFDF7076051ABC5B0528E44220832FBBAC56F37DABEE5424E6FC6CA942D311B1",
"dark.user.css": "6BA1E245BE70B482A85B0EF339DF310AC5BA69FF85F6B2C72A8026702C3F0E81",
"dark-color-scheme.min.js": "6D353AC738180317ACF9D2E046BFFBA0ACC0FA7A8D22B8E16C51127CDE4FE96B",
"dark-important.min.css": "5369385A2C16188FB11E71C4C5B91275646F22F0F09E518E37813CC4FA23A072",
"dark-navbar.min.css": "7FAD547E326B768904B3739C978DF86FFDDD5E5064FB8F490710D197CCC3018B",
"dark-schedule.min.js": "853C446547603F4F0425F19F09F73335C9EC451A790C1C07E5E5B88A09E9B453",
"dark-slice-12.min.css": "B1FB5C974F25E07F0825931D8C629110113AC6F17DCC86677712760A57EABF00",
"dark-styles.min.js": "0F1F90CB24296E7399B63198A95AC429BFF351D37A186072B4FB5135AD1F2CDF",
"debounce.min.js": "54D33E1273C1F3FE19550BF1844339C3D54D6B01DF8A39C3162D95B93B079CFA",
"default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D",
@ -89,7 +88,7 @@
"expand-description.min.css": "58C7710A50521B80F7D872BDC4C652610D84C4FABC6874BA66DA37B4F8759224",
"expand-description.min.js": "A56857AD6B1C9F431B233D188E857D30DD5A2EB644986DE32A21280B1B7BC7A7",
"extend-feeds-live.min.css": "3C22AA3BA22548D09BCE693DB4DBCB016C62C329CFB3115D6D33808798F26253",
"extend-feeds-live.min.js": "EDCA060A7DDF3339CCB1F8A0D4360FE1016FD78B0FDEDCB4CBDB7280895FF5F6",
"extend-feeds-live.min.js": "9AB5D02289C2FEA81C6E64239478FC7C3B30D7AEBFF8C35F1A69FBDF2A55919F",
"favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84",
"feeds-apis.min.js": "CE3724D1D9A89C8B3A6A9134B98DCAB51CA1BF13A4DCEF18AAF084464F44FFD4",
"feeds-filter.min.js": "9E8BC1A669D97992E888A3154FCE64912CE0B7A303D6BE40C3CA0C71A9533B96",

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
@namespace Bilibili-Evolved
@homepageURL https://github.com/the1812/Bilibili-Evolved
@updateURL https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/min/dark.user.css
@version 717.28.0
@version 717.36.0
@license MIT
@author Grant Howard (https://github.com/the1812), Coulomb-G (https://github.com/Coulomb-G)
==/UserStyle== */

View File

@ -1 +1 @@
(()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".live-up-list");if(e===null){return}t.applyStyle("extendFeedsLiveStyle");const i=24;const n=await Ajax.getPages({api:e=>{return Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${e}&pagesize=${i}`)},getList:e=>{return _.get(e,"data.list",[])},getTotal:e=>{return _.get(e,"data.results",0)}});const l=dqa(e,".up-name");const a=l.map(e=>e.innerText.trim());const r=n.filter(e=>a.includes(e.uname));const s=n.filter(e=>!a.includes(e.uname));l.forEach((e,t)=>{const i=r.find(e=>e.uname===a[t]);if(i===undefined){console.warn(`live title not found for ${a[t]}`)}else{e.parentElement.setAttribute("data-live-title",i.title);e.parentElement.setAttribute("title",i.title);e.setAttribute("title",a[t])}});const o=e.children[0];s.forEach(t=>{const i=o.cloneNode(true);dqa(i,"a[href]").forEach(e=>e.setAttribute("href",`https://live.bilibili.com/${t.roomid}`));const n=dq(i,".live-up-img");n.style.backgroundImage=`url(${t.face})`;const l=dq(i,".live-detail");l.setAttribute("data-live-title",t.title);const a=dq(i,".up-name");a.innerHTML=t.uname;a.title=t.uname;e.insertAdjacentElement("beforeend",i)});const{disableProfilePopup:c}=await t.importAsync("disable-profile-popup");c();console.log(r,s)})()}})();
(()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".live-up-list");if(e===null){return}t.applyStyle("extendFeedsLiveStyle");const i=24;const n=await Ajax.getPages({api:e=>{return Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=${e}&pagesize=${i}`)},getList:e=>{return _.get(e,"data.list",[])},getTotal:e=>{return _.get(e,"data.results",0)}});const a=dqa(e,".up-name");const l=a.map(e=>e.innerText.trim());const r=n.filter(e=>l.includes(e.uname));const s=n.filter(e=>!l.includes(e.uname));const o=e.children[0];s.forEach(t=>{const i=o.cloneNode(true);dqa(i,"a[href]").forEach(e=>e.setAttribute("href",`https://live.bilibili.com/${t.roomid}`));const n=dq(i,".live-up-img");n.style.backgroundImage=`url(${t.face})`;const a=dq(i,".up-name");a.innerHTML=t.uname;a.title=t.uname;e.insertAdjacentElement("beforeend",i)});const{disableProfilePopup:c}=await t.importAsync("disable-profile-popup");c();console.log(r,s)})()}})();

View File

@ -44,24 +44,13 @@ interface LiveInfo {
// }
// const extend = [fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo,] as LiveInfo[]
const extend = fullList.filter(it => !presentedNames.includes(it.uname))
liveListNames.forEach((it, index) => {
const liveInfo = presented.find(p => p.uname === presentedNames[index])
if (liveInfo === undefined) {
console.warn(`live title not found for ${presentedNames[index]}`)
} else {
it.parentElement!.setAttribute('data-live-title', liveInfo.title)
it.parentElement!.setAttribute('title', liveInfo.title)
it.setAttribute('title', presentedNames[index])
}
})
const liveDetailItem = liveList.children[0] as HTMLElement
extend.forEach(it => {
const clone = liveDetailItem.cloneNode(true) as HTMLElement
dqa(clone, 'a[href]').forEach(a => a.setAttribute('href', `https://live.bilibili.com/${it.roomid}`))
const face = dq(clone, '.live-up-img') as HTMLElement
face.style.backgroundImage = `url(${it.face})`
const detail = dq(clone, '.live-detail') as HTMLElement
detail.setAttribute('data-live-title', it.title)
const name = dq(clone, '.up-name') as HTMLElement
name.innerHTML = it.uname
name.title = it.uname