Merge branch 'preview' of https://github.com/the1812/Bilibili-Evolved into preview

This commit is contained in:
Coulomb_G 2020-09-03 23:12:42 +08:00
commit fdf1ab1963
33 changed files with 287 additions and 142 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

@ -1 +1 @@
(()=>{return(a,r)=>{const i=`<div class=blackboards><div class=header><div class=title>活动</div><a class=more href=https://www.bilibili.com/blackboard/x/act_list/ target=_blank><icon type=mdi icon=dots-horizontal></icon>更多</a></div><input class="hidden-input blackboard-radio"type=radio name=blackboard v-for="(b, i) of blackboards":checked="i === 0":id="'blackboard' + i":data-index=i :key=i><div class=jump-dots><label v-for="(b, i) of blackboards":for="'blackboard' + i":key=i><div class=jump-dot></div></label></div><div class=blackboard-cards><a class=blackboard-card target=_blank v-for="(b, i) of blackboards":key=i :href=b.url :title=b.title><dpi-img :src=b.imageUrl :alt=b.title :size="{width: 500, height: 250}":root=cardsContainer></dpi-img><div class=title>{{b.title}}</div></a></div></div>`;r.applyStyleFromText(`.simple-home .blackboards{display:grid;grid-template-areas:"header header" "dots cards";grid-template-columns:8px 1fr;grid-template-rows:1fr 250px;row-gap:16px;column-gap:16px;align-self:start}.simple-home .blackboards .blackboard-cards{grid-area:cards;--blackboard-width:568.5px;--blackboard-height:250px;width:var(--blackboard-width);height:var(--blackboard-height);border-radius:16px;overflow:hidden}.simple-home .blackboards .blackboard-cards .blackboard-card{width:100%;height:100%;position:relative;display:block;transition:.3s cubic-bezier(.65,.05,.36,1)}.simple-home .blackboards .blackboard-cards .blackboard-card img{width:100%;height:100%;object-fit:fill;display:block}.simple-home .blackboards .blackboard-cards .blackboard-card .title{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);padding:4px 16px;color:#fff;background-color:#000a;font-size:14px;font-weight:700;border-radius:14px;white-space:nowrap;opacity:0}.simple-home .blackboards .blackboard-cards .blackboard-card:hover .title{opacity:1}`,"blackboard-style");return{export:Object.assign({template:i},{components:{Icon:()=>r.importAsync("icon.vue"),"dpi-img":()=>r.importAsync("dpi-img.vue")},data(){return{blackboards:[],interval:0}},destroyed(){if(this.interval){clearInterval(this.interval)}},computed:{cardsContainer(){return this.$el.querySelector(".blackboard-cards")}},async mounted(){const{getBlackboards:a}=await r.importAsync("blackboard");this.blackboards=(await a()).filter(a=>!a.isAd);const i=dq(".blackboards");this.interval=setInterval(()=>{if(!document.hasFocus()||i.matches(".blackboards:hover")){return}const a=parseInt(dq(`.blackboard-radio:checked`).getAttribute("data-index"));let r;if(a===this.blackboards.length-1){r=0}else{r=a+1}dq(`.blackboard-radio[data-index='${r}']`).checked=true},5e3)}})}}})();
(()=>{return(a,r)=>{const i=`<div class=blackboards><div class=header><div class=title>活动</div><a class=more href=https://www.bilibili.com/blackboard/x/act_list/ target=_blank><icon type=mdi icon=dots-horizontal></icon>更多</a></div><input class="hidden-input blackboard-radio"type=radio name=blackboard v-for="(b, i) of blackboards":checked="i === 0":id="'blackboard' + i":data-index=i :key=i><div class=blackboard-cards><a class=blackboard-card target=_blank v-for="(b, i) of blackboards":key=i :href=b.url :title=b.title><dpi-img :src=b.imageUrl :alt=b.title :size="{width: 500, height: 250}":root=cardsContainer></dpi-img><div class=title>{{b.title}}</div></a></div><div class=jump-dots><label v-for="(b, i) of blackboards":for="'blackboard' + i":key=i><div class=jump-dot></div></label></div></div>`;r.applyStyleFromText(`.simple-home .blackboards{position:relative;display:grid;grid-template-areas:"header header" "cards cards";grid-template-columns:8px 1fr;grid-template-rows:1fr 250px;row-gap:16px;column-gap:16px;align-self:start}.simple-home .blackboards .jump-dots{position:absolute;top:50%;left:8px;transform:translateY(-50%);grid-area:cards;align-self:center;justify-self:center}.simple-home .blackboards .jump-dots label{display:block}.simple-home .blackboards .jump-dots label:not(:last-child){margin-bottom:6px}.simple-home .blackboards .jump-dots .jump-dot{background-color:#8884;border:1px solid #8888;box-sizing:border-box;width:8px;height:20px;border-radius:8px;cursor:pointer}.simple-home .blackboards .blackboard-cards{grid-area:cards;--blackboard-width:568.5px;--blackboard-height:250px;width:var(--blackboard-width);height:var(--blackboard-height);border-radius:16px;overflow:hidden}.simple-home .blackboards .blackboard-cards .blackboard-card{width:100%;height:100%;position:relative;display:block;transition:.3s cubic-bezier(.65,.05,.36,1)}.simple-home .blackboards .blackboard-cards .blackboard-card img{width:100%;height:100%;object-fit:fill;display:block}.simple-home .blackboards .blackboard-cards .blackboard-card .title{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);padding:4px 16px;color:#fff;background-color:#000a;font-size:14px;font-weight:700;border-radius:14px;white-space:nowrap;opacity:0}.simple-home .blackboards .blackboard-cards .blackboard-card:hover .title{opacity:1}`,"blackboard-style");return{export:Object.assign({template:i},{components:{Icon:()=>r.importAsync("icon.vue"),"dpi-img":()=>r.importAsync("dpi-img.vue")},data(){return{blackboards:[],interval:0}},destroyed(){if(this.interval){clearInterval(this.interval)}},computed:{cardsContainer(){return this.$el.querySelector(".blackboard-cards")}},async mounted(){const{getBlackboards:a}=await r.importAsync("blackboard");this.blackboards=(await a()).filter(a=>!a.isAd);const i=dq(".blackboards");this.interval=setInterval(()=>{if(!document.hasFocus()||i.matches(".blackboards:hover")){return}const a=parseInt(dq(`.blackboard-radio:checked`).getAttribute("data-index"));let r;if(a===this.blackboards.length-1){r=0}else{r=a+1}dq(`.blackboard-radio[data-index='${r}']`).checked=true},5e3)}})}}})();

View File

@ -16,33 +16,33 @@
"batch-warning.min.js": "C4D35814CBCFAD0EFB166D0F34B6F37E034DC59E09719BC3656520120E493475",
"biliplus-redirect.min.js": "8446444A9E9974EB32C766CB0CD3826E9F85BAA2B5F09048EBA8F3FEEAE9FA6F",
"blackboard.min.js": "5F50F1DDA203AC0C54AB52868881AA43B22007EAEF042618B1A093BBAFFDEE5B",
"blackboard.vue.min.js": "84A30D5A6F322A3C083FC1100E9FF51233ECD08AFBD89A6449AD2388ACCC8522",
"blackboard.vue.min.js": "65C08D7C295519E833C1CE001E583726410603A482B3036D55F0186ADC5BE1EF",
"blur-video-control.min.css": "B72FA7AD198ED1C9A9620A83881441F96F9FF3083ED12203A324B9753A7CCFFD",
"blur-video-control.min.js": "00A2AC837FC455DF2AED7D0C350265C7438CC6F5C203F085E19639DDB86D0E11",
"bvid-convert.min.css": "F49ED1B27A86CC3957226474EE15E86D5B11974A2C9D6D4968B375222C802FD0",
"bvid-convert.min.js": "C8E50E01B5E5974061B0501B6A3D8AFEBEB096D6FC9C1CCB6AE2A5708C8479DC",
"category-regions.min.js": "F646D084B252E37B85F4A6A9976ECE3E6E331CF0E554B1BF6F885C38E69406F1",
"category-regions.min.js": "42137E9E3B27758FA070C2E9A5E06EBBAEE83FCA9FE51D07C9CFF1C38C046604",
"clear-cache.min.js": "9AB1536D8278DA681831A589AD1414425BF206B36AE109FB4EC1E8A685BB2A9F",
"collapse-live-side-bar.min.css": "22348786547D2D8DB659A306AF2E9C1F2050D66488778C71545AAEF785FD57E6",
"collapse-live-side-bar.min.js": "BB1B1CF157099A70F1AEA3F154C84D9CA1A84A29B5F6E42357CA9F51FFC4965C",
"combo-like.min.js": "368DA34768E947628099D258ED23BC5FFFCFFD25A47346E086C7975C8A52F997",
"comment.min.css": "6A72677F3DAFC1227B058C9487A00DAEE6A1E4BF9839C55888EDF7AFBD8DFF23",
"comment.min.js": "64F7B6951861C25799C48BB1ABCF2A73F79BCBBFC1E9D3BD45EC1F16F94F6451",
"comment-apis.min.js": "37CC8A307C3608C18AE2638C47C31F1E45479C96FCC24B69C41F477B66C45021",
"comment-apis.min.js": "193C9F7E1B288699B01146031A3401E5B5ED6F5DE4D64C15E1D4D20FAB077A01",
"comment-dark.min.css": "E980508E86203743C36FEE4F7149BFF53961ECBC4EC140E8C162D18D395B940A",
"comments-translate.min.js": "1F66CEC885A6DA36E0436C9A6E1D03E89F19ADDC2F89EC6CDA2BB272DC212A66",
"comments-translate.min.js": "03B95FBDE79487B0677DAB1AEDF569A6941845F8F57B45BA46F7678E9EC887CA",
"compact-layout.min.css": "CAC8B0DBA8E90B38D31F0811B7B469709052204AC36D5D3F20FE5D0899FDDCCB",
"compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738",
"copy-comment-link.min.js": "55C103F372CE2B087239C2C2C447886A2DE5E9D33E3AA4870FE6E549588199B0",
"copy-comment-link.min.js": "60E7B180D523C9DC2DB3FFF9EC6A2BBC4548656D9BDED9AC7F23C8B155B28A4E",
"copy-feeds-link.min.js": "579381349AA2A54A7B8A9AA67A7D35E83DBB456E0A73081E80D4C8DB404604A1",
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
"custom-control-background.min.js": "B9F366B251D1572ACE801FF6ECF15D4D1AAB3EA5A5B04B961B6F4310E2AB1A84",
"custom-navbar.min.css": "6564375173FA36D12EEF77D309702EEB92434C316B080776786ACBEEBD2D28F8",
"custom-navbar.min.html": "4A2876F7B8DA2AF730F0A32DB8BBF8152D3E13459AAB72E6F6D326797FD3830D",
"custom-navbar.min.css": "96663A9903546E9E69A9E9BD619ED350E738D76DA7AB63C1DF5F1F878DAB272C",
"custom-navbar.min.html": "E7A688249EAC2C4107A03D63E1BA0038A47C2F8A24299B80843108F4594843A2",
"custom-navbar.min.js": "DC5E37F69D872D8B107EADF1E038B046506FE16080351F06B300DCE9910D3144",
"custom-navbar-activities.min.js": "C2825BA81A3DD933346745F3FC8C45ED88932E180F65E7C8D7EED5CA3559A05E",
"custom-navbar-blank.min.js": "DC2B75D5760EECD3A257785FDFBB7E5DEBF61CD9083C68DD5BCE468B093F54F3",
"custom-navbar-category.min.js": "2D1A6189540E5DE22A9741AFCFDA2FED50EA960B129547B1E756F2D5E53C0C67",
"custom-navbar-category.min.js": "D348AC640ACB81D1F890F101B178D0234A1C819C873B90D706D6ADC0B9A27B05",
"custom-navbar-component.min.js": "1E19E02F7BFCC3397C14907EC8390F03522E128B528CB82412F202BAF57C28E9",
"custom-navbar-dark-mode.min.js": "B5CF26DD29CA67D3F5502A3DD8414AFB63A0E383306E517D2D00ABE94DE0AF25",
"custom-navbar-favorites-list.min.js": "385D4C0B15433326676AF6113F6042A8E3B4ECA002B2FFCFD55D1346438BEB6B",
@ -136,7 +136,7 @@
"home-video.vue.min.js": "ACD3918903369692BF0AA0ADBE3E77B8D6B942EA1DAAB7138B362D263E9DC1F4",
"horizontal-scroll.min.js": "5E0CC9BFCE6A8D8C6576C2AA3BA46775EE109E2427DFC802B237C17BE397B559",
"i18n.de-DE.min.js": "5BDAC5F0493F447A98B4D308817B21AB2787BEF9E3929EA37F0D2ACD3D879337",
"i18n.en-US.min.js": "D67837C16AF1C994E4D7451A0BC32108D54CDF1B2A5AEA9135FD500EAFC9D012",
"i18n.en-US.min.js": "3AF17B07A7F03BDB0F05A5A5A13B7F31EB384EE6214E08FA9893BA41B4F672CF",
"i18n.ja-JP.min.js": "B8F1BC57D64342A8C6EF4B7BF3980B8448520C0DE6DC1FA389F67125A6A68827",
"i18n.min.css": "34678AAA400AD518874AB3157CB6CE62DC801A643580E1718A37707BBC9C5F90",
"i18n.min.js": "2537C9D365EC1E6BEB1707BE5D2D035DD77BD135AA0B1A31C956C3CABBB8D7D0",
@ -168,7 +168,7 @@
"notify-new-version.min.js": "A5BE5C70D460ECE5FB71DCCF4EC113077ACF2363B0438BE92E352F3A30DCCE97",
"old.min.css": "4C8C918BEBE59E9EE19D5E383234767EE2A2F1DB72E86F0C9F9CE01F26DD193C",
"old-tweets.min.js": "387152B26384B0900985F527112841CC00A48F507EAA8FA634D13FFA83447A72",
"online-info-row.vue.min.js": "4707798C1C08F1704142BAEFE43CB4DA3060352A66B0F1A6BFE5A77F8486A195",
"online-info-row.vue.min.js": "719712C1A3EF94678CBB8B8F1A027CBC8853FE4C8B86379C35AF1043C1944E6D",
"outer-watchlater.min.css": "B40E94BADA1A9BC96422777B33150780330763098B539921DA05F9D3BA487424",
"outer-watchlater.min.js": "799E5F280D09562571AC1A9AE15E788A7134D75D4173DFEBC414FE8047DC5502",
"override-navbar.min.css": "E5AA612841281169CA367A238FB934F807900A385CE2298B7352FF3CA4623757",
@ -207,10 +207,10 @@
"show-cover-before-play.min.css": "E4050D66F8014029270CB5A4DEFDE2F847B095BA9ED4274BFED3E131B737B06D",
"show-cover-before-play.min.js": "5B32F053E97341C09B7735659A426D6D9DFAF470B4E16FC8E364F77EA4DAE1B6",
"show-dead-video-title.min.js": "8D591930421EBA43A1BDF50DC8B645C1BD1A17E109FB1CFBCD6B78E6C74E1D68",
"simple-home.vue.min.js": "1F5CF46DEE65549A30C5F0790578EED0C6B3AD6C5F20D9B88CD745C4B7664ABB",
"simple-home.vue.min.js": "D4175D67D6152ECE6C7976D2F5B4AFA5FAC31B3B4F8508648A12BBC30A7F4E66",
"simple-home-bangumi-category.vue.min.js": "F4B541AD738BB6872FD66F5142544828795F34D1B24481C4C04F95047424D658",
"simple-home-categories.vue.min.js": "A1E97FA871BCC098DDF6309B09FDD802AFEC4E2BFC6EEAE5FEEFEB1D3B7C526D",
"simple-home-feeds.vue.min.js": "C1593338AECD2C8E172829E423608177C5CCBF51868E6CBE9BDEB8862D4890DF",
"simple-home-categories.vue.min.js": "EDEF3D993EDEC1E80D131CC0A5AEB1B752E7091B0F730D7F33B14A87AE6D7501",
"simple-home-feeds.vue.min.js": "C529FFB7ED6FC410D947BEB9192EB72BE8AF2A40E20FE47B9CB1AD40D6F2A7DF",
"simple-home-normal-category.vue.min.js": "085F19436277476D5F6F9309EF1E3738B2AF36C56B4E2038B44EAE38F4602C15",
"simplify-home.min.css": "50F0FA046D61ECE5183409CF97C8DBECB4CF64918DF813CD2B39BF9FBD314B42",
"simplify-home.min.js": "F6D7F8E0D45847C3E056711AECE3832785603E7EF85A4B995C028F5CBE539C94",
@ -238,7 +238,7 @@
"trending-videos.vue.min.js": "6B53E8C65270907514BB89BEF8919F21D956C3AD167438C3F3520D01A410B2FB",
"tweets.min.css": "9015C1F165C91B9205ABBE4E8A3B5FA83DB1EB4B5CF2442846AF61E44FF178A8",
"unfold-feeds.min.js": "2E2E99F1EC4E53B791FFE2C89C8D96E278C635BBD0FAE4D3CDC3D49B456D4108",
"url-params-clean.min.js": "E1A9E7A073B584B5B65C952D0DA1EA732CE743E0680BFE945DA9306086F220C8",
"url-params-clean.min.js": "AA73B1E67978373C123083836FF0CC314E9AE390B40040B2F6E4B6221F1DBF04",
"v-checkbox.vue.min.js": "A23C35D5627009A29FD396A024442A19E37DEE70674BF3CE0FA377D781ED2231",
"v-dropdown.vue.min.js": "BA1142E2D44CC9593DA803CAA76FA2B814CBD65D4D4210ABF00E811C361D8A37",
"video-card.vue.min.js": "E67A429519E70AB872B0EF8DB9B5A6992F0C474E98AAEC12468F41C982ABD9C5",

View File

@ -1 +1 @@
(()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:181,tv:11,film:23,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})();
(()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,food:211,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:181,tv:11,film:23,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",food:"v/food",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})();

View File

@ -1 +1 @@
(()=>{return(e,t)=>{const n="bb-comment";const r=[];const o=[];const s=[];const c=[];const i=e=>{const t=e.querySelector(".con .user .name");const n={id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:t.textContent,content:e.querySelector(".con .text").textContent,timeText:e.querySelector(".con .info .time").textContent,likes:parseInt(e.querySelector(".con .like span").textContent),replies:dqa(e,".reply-box .reply-item").map(e=>{const t=e.querySelector(".reply-con .user");return{id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:t.textContent,content:e.querySelector(".text-con").textContent,timeText:e.querySelector(".info .time").textContent,likes:parseInt(e.querySelector(".info .like span").textContent)}})};return n};const a=e=>{if(e.observer){return}e.items=dqa(e.element,".list-item.reply-wrap").map(i);e.items.forEach(e=>{o.forEach(t=>t(e))});e.observer=Observer.childListSubtree(e.element,t=>{t.forEach(t=>{const n=e=>{return e instanceof HTMLElement&&e.classList.contains("list-item")&&e.classList.contains("reply-wrap")};t.addedNodes.forEach(t=>{if(n(t)){const n=i(t);e.items.push(n);o.forEach(e=>e(n))}});t.removedNodes.forEach(t=>{if(n(t)){const n=t.getAttribute("data-id");const r=e.items.findIndex(e=>e.id===n);if(r!==-1){const[t]=e.items.splice(r,1);s.forEach(e=>e(t))}}})})})};const m=e=>{if(e instanceof HTMLElement&&e.classList.contains(n)){const t={element:e,items:[]};r.push(t);a(t);c.forEach(e=>e(t))}};const d=e=>{r.forEach(t=>e(t));c.push(e)};const u=e=>{const{added:t,removed:n}=e;d(e=>{if(t){e.items.forEach(e=>t(e));o.push(t)}if(n){s.push(n)}})};Observer.childListSubtree(document.body,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>m(e))})});dqa("."+n).forEach(m);return{export:{commentAreas:r,forEachCommentArea:d,forEachCommentItem:u}}}})();
(()=>{return(e,t)=>{const r="bb-comment";const o=[];const n=[];const s=[];const c=[];const i=e=>{const t=e.querySelector(".con .user .name");const r=e=>{const t=e.querySelector(".reply-face");const r=e.querySelector(".reply-con .user .name");return{id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:r.textContent,content:e.querySelector(".text-con").textContent,timeText:e.querySelector(".info .time").textContent,likes:parseInt(e.querySelector(".info .like span").textContent)}};const o={id:e.getAttribute("data-id"),element:e,userID:t.getAttribute("data-usercard-mid"),userName:t.textContent,content:e.querySelector(".con .text").textContent,timeText:e.querySelector(".con .info .time").textContent,likes:parseInt(e.querySelector(".con .like span").textContent),replies:[]};if(dq(e,".reply-box .view-more")){const t=dq(e,".reply-box");Observer.childList(t,t=>{o.replies=dqa(e,".reply-box .reply-item").map(r);if(t.length!==0){o.onRepliesUpdate&&o.onRepliesUpdate(o.replies)}})}else{o.replies=dqa(e,".reply-box .reply-item").map(r)}return o};const a=e=>{if(e.observer){return}e.items=dqa(e.element,".list-item.reply-wrap").map(i);e.items.forEach(e=>{n.forEach(t=>t(e))});e.observer=Observer.childListSubtree(e.element,t=>{t.forEach(t=>{const r=e=>{return e instanceof HTMLElement&&e.classList.contains("list-item")&&e.classList.contains("reply-wrap")};t.addedNodes.forEach(t=>{if(r(t)){const r=i(t);e.items.push(r);n.forEach(e=>e(r))}});t.removedNodes.forEach(t=>{if(r(t)){const r=t.getAttribute("data-id");const o=e.items.findIndex(e=>e.id===r);if(o!==-1){const[t]=e.items.splice(o,1);s.forEach(e=>e(t))}}})})})};const l=e=>{if(e instanceof HTMLElement&&e.classList.contains(r)){const t={element:e,items:[]};o.push(t);a(t);c.forEach(e=>e(t))}};const d=e=>{o.forEach(t=>e(t));c.push(e)};const m=e=>{const{added:t,removed:r}=e;d(e=>{if(t){e.items.forEach(e=>t(e));n.push(t)}if(r){s.push(r)}})};Observer.childListSubtree(document.body,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>l(e))})});dqa("."+r).forEach(l);return{export:{commentAreas:o,forEachCommentArea:d,forEachCommentItem:m}}}})();

View File

@ -1 +1 @@
(()=>{return(t,e)=>{const a=async()=>{const{getTranslator:a}=await e.importAsync("feeds-translate-providers");const n=Vue.extend({template:`\n<div class="translate-container">\n<div class="translate" v-if="!working && !translated" @click="translate()">\n<i class="mdi mdi-earth"></i>翻译\n</div>\n<i v-if="working" class="translating mdi mdi-18px mdi-loading mdi-spin"></i>\n<div class="translated" v-if="translated">翻译自<a :href="activeTranslator.link" target="_blank">{{ activeTranslator.name }}</a>:</div>\n<div v-if="translated" class="translate-result">{{ result }}</div>\n</div>\n`,props:{text:{type:String,required:true}},data(){return{result:"",working:false,activeTranslator:{}}},computed:{translated(){return this.result!==""}},methods:{async translate(){try{this.working=true;const e=this.text;const n=this.activeTranslator=a();this.result=await n.translate(e,{targetLanguage:(()=>{if(t.i18n){return languageNameToCode[t.i18nLanguage]}if(t.feedsTranslateLanguage!==""){return t.feedsTranslateLanguage}return})()});console.log(e,n,this.result)}catch(t){logError(t)}finally{this.working=false}}}});const r=t=>{const e=dqa(t,".text, .text-con");if(e.length===0){return}e.forEach(t=>{if(t.nextElementSibling&&t.nextElementSibling.classList.contains("translate-container")){return}const e=new n({propsData:{text:t.innerText}}).$mount();t.insertAdjacentElement("afterend",e.$el)})};const{forEachCommentItem:s}=await e.importAsync("comment-apis");s({added:t=>{const{element:e}=t;r(e)}})};if(t.feedsTranslate){e.applyStyle("feedsTranslateStyle");a()}return{export:{commentsTranslate:a}}}})();
(()=>{return(t,e)=>{const a=async()=>{const{getTranslator:a}=await e.importAsync("feeds-translate-providers");const n=Vue.extend({template:`\n<div class="translate-container">\n<div class="translate" v-if="!working && !translated" @click="translate()">\n<i class="mdi mdi-earth"></i>翻译\n</div>\n<i v-if="working" class="translating mdi mdi-18px mdi-loading mdi-spin"></i>\n<div class="translated" v-if="translated">翻译自<a :href="activeTranslator.link" target="_blank">{{ activeTranslator.name }}</a>:</div>\n<div v-if="translated" class="translate-result">{{ result }}</div>\n</div>\n`,props:{text:{type:String,required:true}},data(){return{result:"",working:false,activeTranslator:{}}},computed:{translated(){return this.result!==""}},methods:{async translate(){try{this.working=true;const e=this.text;const n=this.activeTranslator=a();this.result=await n.translate(e,{targetLanguage:(()=>{if(t.i18n){return languageNameToCode[t.i18nLanguage]}if(t.feedsTranslateLanguage!==""){return t.feedsTranslateLanguage}return})()});console.log(e,n,this.result)}catch(t){logError(t)}finally{this.working=false}}}});const r=t=>{const e=dqa(t,".text, .text-con");if(e.length===0){return}e.forEach(t=>{if(t.nextElementSibling&&t.nextElementSibling.classList.contains("translate-container")){return}const e=new n({propsData:{text:t.innerText}}).$mount();t.insertAdjacentElement("afterend",e.$el)})};const{forEachCommentItem:s}=await e.importAsync("comment-apis");s({added:t=>{const{element:e}=t;t.onRepliesUpdate=(t=>t.forEach(t=>r(t.element)));r(e)}})};if(t.feedsTranslate){e.applyStyle("feedsTranslateStyle");a()}return{export:{commentsTranslate:a}}}})();

View File

@ -1 +1 @@
(()=>{return(t,e)=>{(async()=>{const{forEachCommentItem:t}=await e.importAsync("comment-apis");const i=["https://t.bilibili.com","https://space.bilibili.com","https://live.bilibli.com"];const n=t=>{if(document.URL.match(/\/\/t\.bilibili\.com\/(\d+)/)){return""}if(i.every(t=>!document.URL.includes(t))){return""}let e=t;while(e!==null&&e!==document.body){if(e.hasAttribute("data-did")){return`https://t.bilibili.com/${e.getAttribute("data-did")}`}e=e.parentElement}return""};const l=t=>{[t,...t.replies].forEach(t=>{const e=dq(t.element,".opera-list ul");if(!e||dq(e,".copy-link")){return}const i=document.createElement("li");i.classList.add("copy-link");i.textContent="复制链接";i.addEventListener("click",()=>{const e=n(t.element)||document.URL;GM_setClipboard(`${e}#reply${t.id}`,{mimetype:"text/plain"})});e.appendChild(i)})};t({added:l})})()}})();
(()=>{return(t,e)=>{(async()=>{const{forEachCommentItem:t}=await e.importAsync("comment-apis");const i=["https://t.bilibili.com","https://space.bilibili.com","https://live.bilibli.com"];const n=t=>{if(document.URL.match(/\/\/t\.bilibili\.com\/(\d+)/)){return""}if(i.every(t=>!document.URL.includes(t))){return""}let e=t;while(e!==null&&e!==document.body){if(e.hasAttribute("data-did")){return`https://t.bilibili.com/${e.getAttribute("data-did")}`}e=e.parentElement}return""};const l=t=>{const e=t=>{t.forEach(t=>{const e=dq(t.element,".opera-list ul");if(!e||dq(e,".copy-link")){return}const i=document.createElement("li");i.classList.add("copy-link");i.textContent="复制链接";i.addEventListener("click",()=>{const e=n(t.element)||document.URL;GM_setClipboard(`${e}#reply${t.id}`,{mimetype:"text/plain"})});e.appendChild(i)})};e([t,...t.replies]);t.onRepliesUpdate=(t=>e(t))};t({added:l})})()}})();

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

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 56 KiB

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

@ -1 +1 @@
(()=>{return(e,t)=>{const a=`<div class=feeds><div class=header><div class=tabs><div class=title>动态</div><div class=tab v-for="tab in tabs":key=tab.type @click=changeTab(tab) :class="{active: currentTab === tab}"><div class=tab-name>{{tab.name}}</div></div></div><a class=more href=//t.bilibili.com/ target=_blank><icon type=home icon=activity></icon>全部动态</a></div><div class=contents ref=contents><div class=card-wrapper v-for="card in feedCards":key=card.id><video-card :data=card orientation=vertical></video-card></div><div class=empty v-if="feedCards.length === 0">没有动态哦(´・_・\`)</div></div></div>`;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:4;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);if(!e.simpleHomeWheelScroll){return}const a=this.$refs.contents;const{enableHorizontalScroll:i}=await t.importAsync("horizontal-scroll");i(a)}})}}})();
(()=>{return(e,t)=>{const a=`<div class=feeds><div class=header><div class=tabs><div class=title>动态</div><div class=tab v-for="tab in tabs":key=tab.type @click=changeTab(tab) :class="{active: currentTab === tab}"><div class=tab-name>{{tab.name}}</div></div></div><a class=online target=_blank href=https://www.bilibili.com/video/online.html>当前在线</a><a class=more href=//t.bilibili.com/ target=_blank><icon type=home icon=activity></icon>全部动态</a></div><div class=contents ref=contents><div class=card-wrapper v-for="card in feedCards":key=card.id><video-card :data=card orientation=vertical></video-card></div><div class=empty v-if="feedCards.length === 0">没有动态哦(´・_・\`)</div></div></div>`;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:4;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);if(!e.simpleHomeWheelScroll){return}const a=this.$refs.contents;const{enableHorizontalScroll:i}=await t.importAsync("horizontal-scroll");i(a)}})}}})();

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{return(t,e)=>{const r=["spm_id_from","from_source","from_spmid","from","seid","share_source","share_medium","share_plat","share_tag","bbid","ts","timestamp","unique_k","rt","tdsourcetag","accept_quality","broadcast_type","current_qn","current_quality","playurl_h264","playurl_h265","quality_description","network","network_status","platform_network_status","p2p_type"];const o=[/game\.bilibili\.com\/fgo/];const s=t=>{return t};const n=()=>{const t=location.search.substring(1).split("&");const e=t.filter(t=>{if(r.some(e=>t.startsWith(`${e}=`))){return false}return true});const o=e.join("&");const n=s(document.URL.replace(location.search,""));const a=o?"?"+o:"";const c=n+a;if(c!==document.URL){console.log("[URL params clean]",document.URL,c);history.replaceState({},document.title,c)}};fullyLoaded(()=>{if(document.contentType==="text/html"){n();Observer.videoChange(()=>n())}})}})();
(()=>{return(t,e)=>{const r=["spm_id_from","from_source","from_spmid","from","seid","share_source","share_medium","share_plat","share_tag","bbid","ts","timestamp","unique_k","rt","tdsourcetag","accept_quality","broadcast_type","current_qn","current_quality","playurl_h264","playurl_h265","quality_description","network","network_status","platform_network_status","p2p_type","referfrom"];const o=[/game\.bilibili\.com\/fgo/];const s=t=>{return t};const n=()=>{const t=location.search.substring(1).split("&");const e=t.filter(t=>{if(r.some(e=>t.startsWith(`${e}=`))){return false}return true});const o=e.join("&");const n=s(document.URL.replace(location.search,""));const a=o?"?"+o:"";const c=n+a;if(c!==document.URL){console.log("[URL params clean]",document.URL,c);history.replaceState({},document.title,c)}};fullyLoaded(()=>{if(document.contentType==="text/html"){n();Observer.videoChange(()=>n())}})}})();

View File

@ -1,6 +1,6 @@
#custom-navbar-home-popup {
max-height: 80vh;
max-height: calc(100vh - 100px);
display: flex;
flex-direction: column;
flex-wrap: wrap;

View File

@ -86,6 +86,7 @@ export class Category extends NavbarComponent {
'音乐现场': 'https://www.bilibili.com/v/music/live/',
'音乐综合': 'https://www.bilibili.com/v/music/other/',
'音频': 'https://www.bilibili.com/audio/home?musicType=music',
'说唱': 'https://www.bilibili.com/v/rap',
},
},
: {
@ -137,7 +138,6 @@ export class Category extends NavbarComponent {
count: regionCount[160], link: `https://www.bilibili.com/v/life/`, subRegions: {
'搞笑': 'https://www.bilibili.com/v/life/funny/',
'日常': 'https://www.bilibili.com/v/life/daily/',
'美食圈': 'https://www.bilibili.com/v/life/food/',
'动物圈': 'https://www.bilibili.com/v/life/animal/',
'手工': 'https://www.bilibili.com/v/life/handmake/',
'绘画': 'https://www.bilibili.com/v/life/painting/',
@ -146,6 +146,18 @@ export class Category extends NavbarComponent {
'其他': 'https://www.bilibili.com/v/life/other/'
},
},
: {
icon: 'food',
count: regionCount[211],
link: 'https://www.bilibili.com/v/food/',
subRegions: {
: 'https://www.bilibili.com/v/food/make/',
: 'https://www.bilibili.com/v/food/detective/',
: 'https://www.bilibili.com/v/food/measurement/',
: 'https://www.bilibili.com/v/food/rural/',
: 'https://www.bilibili.com/v/food/record/',
},
},
: {
icon: 'kichiku',
count: regionCount[119], link: `https://www.bilibili.com/v/kichiku/`, subRegions: {
@ -179,7 +191,6 @@ export class Category extends NavbarComponent {
count: regionCount[5], link: `https://www.bilibili.com/v/ent/`, subRegions: {
'综艺': 'https://www.bilibili.com/v/ent/variety/',
'明星': 'https://www.bilibili.com/v/ent/star/',
'Korea相关': 'https://www.bilibili.com/v/ent/korea/'
},
},
: {
@ -211,6 +222,8 @@ export class Category extends NavbarComponent {
},
},
: { icon: 'blackroom', count: ``, link: `https://www.bilibili.com/blackroom/`, },
: { icon: 'zhishi', count: ``, link: `https://www.bilibili.com/cheese/`, },
PLUS: { icon: 'musicplus', count: ``, link: `https://www.bilibili.com/v/musicplus/`, },
: { icon: 'topic', count: ``, link: `https://www.bilibili.com/blackboard/topic_list.html`, },
: { icon: 'activit', count: ``, link: `https://www.bilibili.com/blackboard/x/act_list`, },
}

View File

@ -1,4 +1,90 @@
<svg aria-hidden="true" style="position: absolute; width: 0px; height: 0px; overflow: hidden;">
<symbol id="header-icon-musicplus" viewBox="0 0 1024 1024">
<path
d="M128 256m25.6 0l716.8 0q25.6 0 25.6 25.6l0 512q0 25.6-25.6 25.6l-716.8 0q-25.6 0-25.6-25.6l0-512q0-25.6 25.6-25.6Z"
fill="#3DA9D3"></path>
<path
d="M153.6 256h153.6v563.2H153.6a25.6 25.6 0 0 1-25.6-25.6V281.6a25.6 25.6 0 0 1 25.6-25.6zM870.4 256h-153.6v563.2h153.6a25.6 25.6 0 0 0 25.6-25.6V281.6a25.6 25.6 0 0 0-25.6-25.6z"
fill="#7DD3E0"></path>
<path
d="M768 320m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
<path
d="M768 448m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
<path
d="M768 576m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
<path
d="M768 704m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
<path
d="M576 180.736c8.7808-2.6112 15.8976-1.92 21.3504 2.0736 5.4784 3.9936 11.008 9.8304 16.64 17.4592 5.6064 7.6544 12.544 16.256 20.7616 25.856 8.2432 9.5744 19.456 18.5088 33.6896 26.7776 12.2368 7.68 22.9632 12.9536 32.2048 15.7696l25.9584 7.8592c8.2176 2.432 16.128 5.5296 23.6544 9.2672 0 0 17.7408 9.984 25.5232 20.48 8.1152 10.9056 14.8736 19.6608 16.6144 30.976 1.7152 11.3408 1.6128 21.9136-0.4608 31.6928a72.7296 72.7296 0 0 1-9.5744 24.576c-4.2752 6.5792-7.8592 9.9328-10.752 9.9328-2.8672 0.0256-5.4016-1.6128-7.6032-5.0432-2.2272-3.3792-3.84-9.984-4.864-19.7632-1.6896-15.872-6.656-27.0336-14.976-33.4592-8.32-6.4256-21.3504-9.984-39.1424-10.7264a96.0512 96.0512 0 0 1-48.9216-15.616c-12.3648-8.0384-24.064-16.9984-34.9696-26.8032-8.8832-7.3728-15.7952-9.5488-20.8896-6.2976-4.992 3.2256-7.5776 8.1152-7.7312 14.7456l-0.5632 26.752-6.7072 273.792-0.7936 35.4048c0.1536 9.856-1.664 21.1968-5.4272 33.9968-3.7888 12.8-10.6752 25.2928-20.6592 37.4528-9.9328 12.16-23.0912 23.2192-39.4752 33.2288s-36.5824 17.3568-60.5952 22.0672c-24.448 4.7616-46.4128 3.584-65.8944-3.5072-19.456-7.0912-34.3808-17.4336-44.7744-31.0272-10.24-12.928-15.4368-29.5936-14.7712-47.5136 0.6912-18.048 8.8576-36.0448 24.4736-53.9648 15.616-17.92 32.4352-31.2832 50.432-40.1152a198.8096 198.8096 0 0 1 51.8144-17.7152 178.8416 178.8416 0 0 1 44.3136-3.0208c13.0048 1.0496 22.5792 2.3808 28.7488 3.9424 0 0 6.4512-280.1664 8.2944-341.6064 0.2304-12.1088 3.584-22.3232 9.9328-30.976 6.4-8.5504 14.7712-14.208 25.1392-16.9472z m160.9216 288.1792a12.8 12.8 0 0 1 0.3584 2.9696v40.96l41.728-6.912a12.8 12.8 0 0 1 14.8992 12.5952v15.0016a12.8 12.8 0 0 1-10.7008 12.6464l-45.952 7.6288 0.0256 45.3632a12.8 12.8 0 0 1-9.8304 12.4416l-15.36 3.6608a12.8 12.8 0 0 1-15.7696-12.4416V560.64l-41.1136 6.8608a12.8 12.8 0 0 1-14.8992-12.6208v-15.0016a12.8 12.8 0 0 1 10.7008-12.6464l45.312-7.552v-44.1344a12.8 12.8 0 0 1 9.8304-12.4672l15.36-3.6352a12.8 12.8 0 0 1 15.4112 9.472z"
fill="#FFD469"></path>
<path
d="M179.2 320m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
<path
d="M179.2 448m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
<path
d="M179.2 576m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
<path
d="M179.2 704m15.36 0l46.08 0q15.36 0 15.36 15.36l0 20.48q0 15.36-15.36 15.36l-46.08 0q-15.36 0-15.36-15.36l0-20.48q0-15.36 15.36-15.36Z"
fill="#3DA9D3"></path>
</symbol>
<symbol id="header-icon-zhishi" viewBox="0 0 1024 1024">
<path
d="M781.3671875 132.3125C842.2859375 132.3125 891.6875 182.684375 891.6875 244.8265625v533.334375c0 62.1-49.359375 112.471875-110.3203125 112.471875H518.75c0-16.115625-25.6921875-29.1515625-57.375-29.1515625-31.6828125 0-57.375 13.078125-57.375 29.1515625H284.8203125C223.9015625 890.6328125 174.5 840.2609375 174.5 778.203125V244.8265625C174.5 182.684375 223.859375 132.3125 284.8203125 132.3125h496.546875z"
fill="#FBC92A"></path>
<path
d="M781.3671875 132.3125C842.2859375 132.3125 891.6875 182.684375 891.6875 244.8265625v209.671875c-49.4859375 4.89375-86.0625 22.021875-86.0625 42.3984375 0 20.3765625 36.5765625 37.546875 86.0625 42.35625v34.7203125c0 62.1421875-49.359375 112.5140625-110.3203125 112.5140625H284.8203125C223.9015625 686.4875 174.5 636.115625 174.5 573.9734375V244.8265625C174.5 182.684375 223.859375 132.3125 284.8203125 132.3125h496.546875z"
fill="#FFEA85"></path>
<path d="M346.625 686.4875a114.75 58.3453125 0 1 0 229.5 0 114.75 58.3453125 0 1 0-229.5 0Z" fill="#FBC92A"></path>
<path d="M260.5625 803.1359375a43.03125 42.1875 0 1 0 86.0625 0 43.03125 42.1875 0 1 0-86.0625 0Z" fill="#F4B828">
</path>
<path d="M490.0625 803.1359375a71.71875 42.1875 0 1 0 143.4375 0 71.71875 42.1875 0 1 0-143.4375 0Z" fill="#F4B828">
</path>
<path
d="M674.50625 477.4484375a27.2109375 27.2109375 0 0 1 39.0234375 1.2234375 28.51875 28.51875 0 0 1-1.18125 39.740625 238.021875 238.021875 0 0 1-330.91875 0 28.51875 28.51875 0 0 1-1.18125-39.740625 27.2109375 27.2109375 0 0 1 38.98125-1.2234375 183.6421875 183.6421875 0 0 0 255.2765625 0z"
fill="#FBC92A"></path>
<path
d="M734.7921875 272.9234375h5.1890625a41.765625 41.765625 0 0 1 41.34375 42.1875v56.278125c0 23.2875-18.478125 42.1875-41.34375 42.1875h-5.1890625a41.765625 41.765625 0 0 1-41.34375-42.1875V315.1109375c0-23.2875 18.5203125-42.1875 41.34375-42.1875zM353.796875 272.9234375h5.1890625a41.765625 41.765625 0 0 1 41.34375 42.1875v56.278125c0 23.2875-18.5203125 42.1875-41.34375 42.1875H353.796875a41.765625 41.765625 0 0 1-41.34375-42.1875V315.1109375c0-23.2875 18.478125-42.1875 41.34375-42.1875z"
fill="#FBC92A"></path>
</symbol>
<symbol id="header-icon-food" viewBox="0 0 1024 1024">
<path
d="M192.075294 503.883294m-75.294118 0a75.294118 75.294118 0 1 0 150.588236 0 75.294118 75.294118 0 1 0-150.588236 0Z"
fill="#FA942D"></path>
<path
d="M342.663529 411.211294m-75.294117 0a75.294118 75.294118 0 1 0 150.588235 0 75.294118 75.294118 0 1 0-150.588235 0Z"
fill="#FA942D"></path>
<path
d="M284.747294 480.722824m-75.294118 0a75.294118 75.294118 0 1 0 150.588236 0 75.294118 75.294118 0 1 0-150.588236 0Z"
fill="#FE5D79"></path>
<path
d="M765.470118 532.841412m-127.427765 0a127.427765 127.427765 0 1 0 254.855529 0 127.427765 127.427765 0 1 0-254.855529 0Z"
fill="#FA942D"></path>
<path
d="M632.259765 457.547294m-133.210353 0a133.210353 133.210353 0 1 0 266.420706 0 133.210353 133.210353 0 1 0-266.420706 0Z"
fill="#FA942D"></path>
<path
d="M672.798118 556.016941m-150.588236 0a150.588235 150.588235 0 1 0 301.176471 0 150.588235 150.588235 0 1 0-301.176471 0Z"
fill="#FE5D79"></path>
<path
d="M932.291765 474.925176a28.762353 28.762353 0 0 1 28.747294 28.762353l-0.045177 1.355295-0.090353 1.355294c-14.305882 150.919529-130.605176 272.865882-280.741647 299.188706l20.178824 80.745411a23.160471 23.160471 0 0 1-22.467765 28.777412H343.371294a23.160471 23.160471 0 0 1-22.467765-28.777412l20.178824-80.745411C192.813176 779.595294 77.552941 660.329412 60.928 512.015059l-0.557176-5.376a28.958118 28.958118 0 0 1 28.822588-31.713883h843.083294z"
fill="#FDDC7A"></path>
<path
d="M442.548706 196.924235h136.146823c21.263059 0 39.800471 14.456471 44.950589 35.087059l60.732235 242.913882H336.865882l60.732236-242.898823a46.336 46.336 0 0 1 44.950588-35.102118z"
fill="#F6C338"></path>
<path
d="M688.037647 192.903529c9.441882-30.177882 28.385882-29.409882 34.680471-47.585882 7.062588-20.449882 9.366588-45.718588 6.927058-75.821176 16.850824 17.935059 25.976471 37.014588 30.945883 62.283294 4.894118 24.937412-9.125647 44.182588-29.06353 74.480941-19.922824 30.313412-8.809412 67.614118 0 94.915765-16.850824-17.92-59.904-55.777882-43.474823-108.272942zM283.361882 154.247529c11.324235-37.707294 34.063059-36.773647 41.60753-59.482353 8.493176-25.554824 11.264-57.133176 8.31247-94.765176 20.239059 22.407529 31.201882 46.260706 37.165177 77.854118 5.872941 31.171765-10.947765 55.220706-34.876235 93.108706-23.943529 37.872941-10.601412 84.48 0 118.633411-20.239059-22.422588-71.936-69.722353-52.208942-135.348706z"
fill="#C6D2E1"></path>
<path
d="M510.629647 706.605176a92.672 92.672 0 0 1 92.672 92.672v115.832471H417.957647v-115.832471a92.672 92.672 0 0 1 92.672-92.672z"
fill="#F5BC20"></path>
</symbol>
<symbol id="header-icon-music" viewBox="0 0 1024 1024">
<path
d="M881.92 460.8A335.36 335.36 0 0 0 547.584 125.696h-73.216A335.616 335.616 0 0 0 139.776 460.8v313.6a18.688 18.688 0 0 0 18.432 18.688h41.984c13.568 46.336 37.888 80.384 88.576 80.384h98.304a37.376 37.376 0 0 0 37.376-36.864l1.28-284.672a36.864 36.864 0 0 0-37.12-37.12h-99.84a111.616 111.616 0 0 0-51.2 12.8v-73.216a242.432 242.432 0 0 1 241.664-241.664h67.328a242.176 242.176 0 0 1 241.408 241.664v74.496a110.592 110.592 0 0 0-54.272-14.08h-99.84a36.864 36.864 0 0 0-37.12 37.12v284.672a37.376 37.376 0 0 0 37.376 36.864h98.304c51.2 0 75.008-34.048 88.576-80.384h41.984a18.688 18.688 0 0 0 18.432-18.688z"

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -16,11 +16,6 @@
:data-index="i"
:key="i"
/>
<div class="jump-dots">
<label v-for="(b, i) of blackboards" :for="'blackboard' + i" :key="i">
<div class="jump-dot"></div>
</label>
</div>
<div class="blackboard-cards">
<a
class="blackboard-card"
@ -34,6 +29,11 @@
<div class="title">{{b.title}}</div>
</a>
</div>
<div class="jump-dots">
<label v-for="(b, i) of blackboards" :for="'blackboard' + i" :key="i">
<div class="jump-dot"></div>
</label>
</div>
</div>
</template>
@ -88,14 +88,39 @@ export default {
<style lang="scss">
$first-row-height: 250px;
.simple-home .blackboards {
position: relative;
display: grid;
grid-template-areas: 'header header' 'dots cards';
grid-template-areas: 'header header' 'cards cards';
grid-template-columns: 8px 1fr;
grid-template-rows: 1fr $first-row-height;
row-gap: 16px;
column-gap: 16px;
align-self: start;
.jump-dots {
position: absolute;
top: 50%;
left: 8px;
transform: translateY(-50%);
grid-area: cards;
align-self: center;
justify-self: center;
& label {
display: block;
}
& label:not(:last-child) {
margin-bottom: 6px;
}
.jump-dot {
background-color: #8884;
border: 1px solid #8888;
box-sizing: border-box;
width: 8px;
height: 20px;
border-radius: 8px;
cursor: pointer;
}
}
.blackboard-cards {
grid-area: cards;
--blackboard-width: 568.5px;

View File

@ -9,6 +9,7 @@ export const RegionCodes: { [key in keyof SimpleHomeCategoryOrders]: number } =
tech: 36,
digital: 188,
life: 160,
food: 211,
kichiku: 119,
fashion: 155,
// ads: 165,
@ -33,6 +34,7 @@ export const RegionLinks: { [key in keyof SimpleHomeCategoryOrders]: string } =
tech: 'v/technology',
digital: 'v/digital',
life: 'v/life',
food: 'v/food',
kichiku: 'v/kichiku',
fashion: 'v/fashion',
// ads: 'v/ad/ad',

View File

@ -43,6 +43,7 @@ const tabNames = {
tech: '知识',
digital: '数码',
life: '生活',
food: '美食',
kichiku: '鬼畜',
fashion: '时尚',
// ads: '广',

View File

@ -136,7 +136,7 @@ export default {
grid-area: main;
background-color: #8882;
position: relative;
width: 370px;
width: 350px;
height: 204px;
border-radius: 8px;
overflow: hidden;

View File

@ -13,11 +13,11 @@
<div class="tab-name">{{tab.name}}</div>
</div>
</div>
<!-- <a
<a
class="online"
target="_blank"
href="https://www.bilibili.com/video/online.html"
>在线人数: {{online}}</a> -->
>当前在线</a>
<a class="more" href="//t.bilibili.com/" target="_blank">
<icon type="home" icon="activity"></icon>全部动态
</a>

View File

@ -39,27 +39,6 @@ export default {
--title-color: white;
color: #ddd;
}
.jump-dots {
grid-area: dots;
align-self: center;
justify-self: center;
& label {
display: block;
}
& label:not(:last-child) {
margin-bottom: 6px;
}
.jump-dot {
background-color: #ddd;
width: 8px;
height: 20px;
border-radius: 8px;
cursor: pointer;
body.dark & {
background-color: #444;
}
}
}
.hidden-input {
display: none;
@for $i from 1 to 16 {

View File

@ -8,6 +8,7 @@ export interface CommentItem {
timeText: string
likes: number
replies: Omit<CommentItem, 'replies'>[]
onRepliesUpdate?: (replies: Omit<CommentItem, 'replies'>[]) => void
}
export type CommentItemCallback = (item: CommentItem) => void
export interface CommentArea {
@ -22,6 +23,19 @@ export type CommentAreaCallback = (area: CommentArea) => void
const commentAreaCallbacks: CommentAreaCallback[] = []
const parseCommentItem = (element: HTMLElement) => {
const user = element.querySelector('.con .user .name') as HTMLElement
const parseReplyItem = (replyElement: HTMLElement) => {
const replyFace = replyElement.querySelector('.reply-face') as HTMLElement
const replyUser = replyElement.querySelector('.reply-con .user .name') as HTMLElement
return {
id: replyElement.getAttribute('data-id')!,
element: replyElement,
userID: replyFace.getAttribute('data-usercard-mid')!,
userName: replyUser.textContent!,
content: replyElement.querySelector('.text-con')!.textContent!,
timeText: replyElement.querySelector('.info .time')!.textContent!,
likes: parseInt(replyElement.querySelector('.info .like span')!.textContent!),
}
}
const item: CommentItem = {
id: element.getAttribute('data-id')!,
element,
@ -30,18 +44,18 @@ const parseCommentItem = (element: HTMLElement) => {
content: element.querySelector('.con .text')!.textContent!,
timeText: element.querySelector('.con .info .time')!.textContent!,
likes: parseInt(element.querySelector('.con .like span')!.textContent!),
replies: dqa(element, '.reply-box .reply-item').map((replyElement: HTMLElement) => {
const replyUser = replyElement.querySelector('.reply-con .user') as HTMLElement
return {
id: replyElement.getAttribute('data-id')!,
element: replyElement,
userID: replyUser.getAttribute('data-usercard-mid')!,
userName: replyUser.textContent!,
content: replyElement.querySelector('.text-con')!.textContent!,
timeText: replyElement.querySelector('.info .time')!.textContent!,
likes: parseInt(replyElement.querySelector('.info .like span')!.textContent!),
replies: [],
}
if (dq(element, '.reply-box .view-more')) {
const replyBox = dq(element, '.reply-box') as HTMLElement
Observer.childList(replyBox, records => {
item.replies = dqa(element, '.reply-box .reply-item').map(parseReplyItem)
if (records.length !== 0) {
item.onRepliesUpdate && item.onRepliesUpdate(item.replies)
}
})
} else {
item.replies = dqa(element, '.reply-box .reply-item').map(parseReplyItem)
}
return item
}

View File

@ -79,6 +79,7 @@ export const commentsTranslate = async () => {
forEachCommentItem({
added: (item) => {
const { element } = item
item.onRepliesUpdate = replies => replies.forEach(r => injectButton(r.element))
injectButton(element)
},
})

View File

@ -25,20 +25,24 @@ import { CommentItem } from '../comment-apis'
return ''
}
const addCopyLinkButton = (comment: CommentItem) => {
[comment, ...comment.replies].forEach(item => {
const operationList = dq(item.element, '.opera-list ul') as HTMLUListElement
if (!operationList || dq(operationList, '.copy-link')) {
return
}
const copyLinkButton = document.createElement('li')
copyLinkButton.classList.add('copy-link')
copyLinkButton.textContent = '复制链接'
copyLinkButton.addEventListener('click', () => {
const url = findParentFeedsUrl(item.element) || document.URL
GM_setClipboard(`${url}#reply${item.id}`, { mimetype: 'text/plain' })
const processItems = (items: Omit<CommentItem, 'replies'>[]) => {
items.forEach(item => {
const operationList = dq(item.element, '.opera-list ul') as HTMLUListElement
if (!operationList || dq(operationList, '.copy-link')) {
return
}
const copyLinkButton = document.createElement('li')
copyLinkButton.classList.add('copy-link')
copyLinkButton.textContent = '复制链接'
copyLinkButton.addEventListener('click', () => {
const url = findParentFeedsUrl(item.element) || document.URL
GM_setClipboard(`${url}#reply${item.id}`, { mimetype: 'text/plain' })
})
operationList.appendChild(copyLinkButton)
})
operationList.appendChild(copyLinkButton)
})
}
processItems([comment, ...comment.replies])
comment.onRepliesUpdate = replies => processItems(replies)
}
forEachCommentItem({
added: addCopyLinkButton

View File

@ -229,7 +229,7 @@ export const map = new Map([
[`上一页`, `Previous`],
[`下一页`, `Next`],
[`搜索`, `Search`],
[`直播中`, `Live boradcasting`],
[`直播中`, `LIVE`],
[`等级`, `Level`],
[`个人中心`, `Profile`],
[`创作中心`, `Creations`],
@ -398,9 +398,13 @@ export const map = new Map([
]],
[`娱乐`, [
`Entertainment`,
{
selector: `.category-item div`,
text: 'Entertain',
},
{
selector: `.primary-menu .nav-menu li .nav-name, .elevator-module .nav-list .item`,
text: `Entmt`
text: `Ettmt`
},
]],
[`自动`, `Auto`],
@ -937,6 +941,13 @@ export const map = new Map([
[`向左旋转`, `Rotate Left`],
[`向右旋转`, `Rotate Right`],
[`翻译`, `Translate`],
[`清除搜索历史`, `Clear history`],
[`当前在线`, `Online Ranking`],
[`知识`, `Knowledge`],
[`说唱`, `Rap`],
[`音乐PLUS`, `Music+`],
[`课堂`, `Courses`],
[`美食`, `Foods`],
[`*`, [
{
selector: `.gui-settings-widgets-box .widgets-container .empty-tip`,

View File

@ -25,6 +25,7 @@ const blockParams = [
'network_status',
'platform_network_status',
'p2p_type',
'referfrom',
]
const noNormalizes = [
/game\.bilibili\.com\/fgo/,