Merge pull request #792 from the1812/preview

Update to v1.10.33
This commit is contained in:
Grant Howard 2020-07-31 00:01:35 +08:00 committed by GitHub
commit 0a497a286c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 588 additions and 183 deletions

View File

@ -453,6 +453,7 @@ declare global {
customStyles: CustomStyle[],
simpleHomeCategoryOrders: SimpleHomeCategoryOrders,
simpleHomeBangumiLayout: '时间表' | '动态',
simpleHomeWheelScroll: boolean,
keymapJumpSeconds: number,
urlParamsClean: boolean,
collapseLiveSideBar: boolean,
@ -491,6 +492,8 @@ declare global {
watchLaterRedirectPage: boolean,
showCoverBeforePlay: boolean,
customNavbarGlobalFixed: boolean,
volumeOverdrive: boolean,
seoJump: boolean,
latestVersionLink: string,
currentVersion: string,
}
@ -547,5 +550,6 @@ declare global {
const matchPattern: (str: string, pattern: string | RegExp) => boolean
type ScriptVersion = 'Stable' | 'Preview' | 'Offline' | 'Preview Offline' | 'Local' | 'Local preview' | 'Local stable' | 'Local offline' | 'Local preview offline'
const getScriptVersion: () => ScriptVersion
const playerReady: () => Promise<void>
}
export { }

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

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
"auto-draw.min.js": "BE2F1D3506F77EE050641EAC49047BB95458BB652E9202AC8D9B57441E356896",
"auto-play.min.js": "DC9938AC15DADDC9D88DCA0C9BE64BE142C37D32CB85E42E23DAB2A7378531E5",
"bangumi-timeline.vue.min.js": "3A02A24CA45655763C3A568F618A10F4009747FB67FCD002EAEBE256F03CEDC4",
"batch-download.min.js": "B4B4BE0939EE045D198FBCA469E06F9BE7AF181F3FC4DE8AEF5CA171AB416AD5",
"batch-download.min.js": "E205A4C855A77B2940C5747384E0750CF50CD7A19A4D4EA623B3AD835D4692BB",
"biliplus-redirect.min.js": "8446444A9E9974EB32C766CB0CD3826E9F85BAA2B5F09048EBA8F3FEEAE9FA6F",
"blackboard.min.js": "5F50F1DDA203AC0C54AB52868881AA43B22007EAEF042618B1A093BBAFFDEE5B",
"blackboard.vue.min.js": "84A30D5A6F322A3C083FC1100E9FF51233ECD08AFBD89A6449AD2388ACCC8522",
@ -25,18 +25,18 @@
"collapse-live-side-bar.min.css": "22348786547D2D8DB659A306AF2E9C1F2050D66488778C71545AAEF785FD57E6",
"collapse-live-side-bar.min.js": "BB1B1CF157099A70F1AEA3F154C84D9CA1A84A29B5F6E42357CA9F51FFC4965C",
"combo-like.min.js": "368DA34768E947628099D258ED23BC5FFFCFFD25A47346E086C7975C8A52F997",
"comment.min.css": "1AAC1A6989D372C428710708FA0D6C735D131B55A99F05F929E27429F76F6427",
"comment.min.css": "6A72677F3DAFC1227B058C9487A00DAEE6A1E4BF9839C55888EDF7AFBD8DFF23",
"comment.min.js": "64F7B6951861C25799C48BB1ABCF2A73F79BCBBFC1E9D3BD45EC1F16F94F6451",
"comment-apis.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
"comment-apis.min.js": "E6B1B2DE0961F85E903504010FDCF6AFEB91E4E8B5CB07C7CAE7AE479ECE9427",
"comment-dark.min.css": "E980508E86203743C36FEE4F7149BFF53961ECBC4EC140E8C162D18D395B940A",
"compact-layout.min.css": "CAC8B0DBA8E90B38D31F0811B7B469709052204AC36D5D3F20FE5D0899FDDCCB",
"compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738",
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
"custom-control-background.min.js": "B9F366B251D1572ACE801FF6ECF15D4D1AAB3EA5A5B04B961B6F4310E2AB1A84",
"custom-navbar.min.css": "E203AC951B2D5B3C81061E3C90D748C6F6E3453DB25EE376E495E3AB6A115C81",
"custom-navbar.min.css": "6564375173FA36D12EEF77D309702EEB92434C316B080776786ACBEEBD2D28F8",
"custom-navbar.min.html": "4A2876F7B8DA2AF730F0A32DB8BBF8152D3E13459AAB72E6F6D326797FD3830D",
"custom-navbar.min.js": "DC5E37F69D872D8B107EADF1E038B046506FE16080351F06B300DCE9910D3144",
"custom-navbar-activities.min.js": "23CED08D224447A793F8B85433EFACA2C151034A025EB9D3B427101C2AFD16AF",
"custom-navbar-activities.min.js": "C2825BA81A3DD933346745F3FC8C45ED88932E180F65E7C8D7EED5CA3559A05E",
"custom-navbar-blank.min.js": "DC2B75D5760EECD3A257785FDFBB7E5DEBF61CD9083C68DD5BCE468B093F54F3",
"custom-navbar-category.min.js": "2D1A6189540E5DE22A9741AFCFDA2FED50EA960B129547B1E756F2D5E53C0C67",
"custom-navbar-component.min.js": "1E19E02F7BFCC3397C14907EC8390F03522E128B528CB82412F202BAF57C28E9",
@ -57,14 +57,15 @@
"danmaku-converter.min.js": "80FE861D0D69A6FB6BE67444A0350182F0245AFE2E61A1043DBA86F092A69868",
"danmaku-send-bar.min.css": "52149D46CF3A15CF6EB186CB49F298DE18B0723E52D8693228F66099847EDCCB",
"danmaku-send-bar.min.js": "7108E72F00C169F26E20409F4AA79F05553310375BABC392EB7E2166224B800A",
"dark.min.css": "41374CB73045C7592A259181DEC971CEDCB32A68F042BE26BD0F17625901D170",
"dark.user.css": "20333BDA9D23EFA4F5449A5AFA4347F1055BE960DEDC84ECB809477B865EC9A7",
"dark.min.css": "FB8E602EF50754FD7B434E0D26B7732C5D8703BF049132E6A440D1D8D7426433",
"dark.user.css": "25A201EAC2498298B53D7BCF14429DCA6984E760D375BD35B9F91E7DC44506DA",
"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": "DEB35BA3663B802EE870B40AC9E98AFB25686F176F72912570C1A01978B4F001",
"dark-styles.min.js": "0F1F90CB24296E7399B63198A95AC429BFF351D37A186072B4FB5135AD1F2CDF",
"dark-slice-10.min.css": "84AA067B4581FCB39223BCB0C9061B2E35424E7418404677009B0B54684C57C8",
"dark-slice-12.min.css": "1FED295526BD833767B66387DA250EAD5522F44FA28EE21A14779E00A47C931C",
"dark-styles.min.js": "77F12E4F159C5139E1FC6030615F88EFD0A02443D34C3C4EDC3DB0B85F081631",
"debounce.min.js": "54D33E1273C1F3FE19550BF1844339C3D54D6B01DF8A39C3162D95B93B079CFA",
"default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D",
"default-danmaku-settings.min.js": "9DBC9AC9B5A3B59EBCC6F04D36527B523D66203AC5FE7C2AD5DB46FFB84F9382",
@ -73,7 +74,7 @@
"default-player-mode.min.js": "3DF0FE367EB990B018C57C1B73BB82CE38FF0631D4C329051F3FD9F4D504071D",
"default-video-quality.min.js": "A24225E0F72D5BCA7DFE529E5B90B03F494C8720ADEF91D466A923FD767EB907",
"default-video-speed.min.js": "EBBF43D8013E32AC13C3E9396480574DDC549BA8BC7CCF15FE4EEF2DFEF64F33",
"disable-feeds-details.min.js": "EBFB35D828BC55BD366D4F3B1B2C3753B1E7B756FF0AEBCB0ED790C2D5FE785D",
"disable-feeds-details.min.js": "AE090C4ED283091F464B7B1509980DBDEF3FD72348AF35826603D418AF6048A4",
"disable-profile-popup.min.js": "69901EC9A3D15D585F61B1370DC69003CE5869499CAC9C57A03B24511F338A2D",
"double-click-fullscreen.min.js": "C6D95B92ECDE67F2C0A3C6B6E4DC655C524F6A98CE0D48733ADCE4ABA780A47B",
"download-audio.min.js": "1F4536DE4FF302BFD026CA17E028AF8EB037FB6D0CB355692549DECAEAE0E8C9",
@ -83,7 +84,7 @@
"download-video.min.css": "FE1F0F36E733DD1B3464700BCA8B8EBEBC310D7649B27E63B3AFC735BCD5E33B",
"download-video.min.html": "5D2E4D31AC6F48A41FCB3AA9B7773FF201B0C8ECC5BC85EEC1427C1FED875E83",
"download-video.min.js": "6937EE9C8ED782FFD07D7B6FFF2F2D59BA05FB436E3F5C9C2A48CEF7C0987607",
"download-video-package.min.js": "B10FF11DE7DFBACEC38F195B8E836511E527215B5E177CB1D223D14F30EB1435",
"download-video-package.min.js": "79C0338420F6B388B1F5FFB50DB8333CD8DBF253DFF564F143AA0C01E79EF518",
"dpi-img.vue.min.js": "11DF7577B754D8C01E8331E4FDAC9494E72523099845A0D6B0D897849CD841D6",
"expand-danmaku.min.js": "B21658C40085AEA8DC49652AE62EB8610BB2EBEAF7A9C9AF69EF3B11E08EEC8D",
"expand-description.min.css": "58C7710A50521B80F7D872BDC4C652610D84C4FABC6874BA66DA37B4F8759224",
@ -91,7 +92,7 @@
"extend-feeds-live.min.css": "3C22AA3BA22548D09BCE693DB4DBCB016C62C329CFB3115D6D33808798F26253",
"extend-feeds-live.min.js": "AC4C8018F5597536501DC8450F1572D6CF9D417229B84D2FE9A0F32E18942ED6",
"favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84",
"feeds-apis.min.js": "CE3724D1D9A89C8B3A6A9134B98DCAB51CA1BF13A4DCEF18AAF084464F44FFD4",
"feeds-apis.min.js": "0FE7AEA92C69ED3F876CC44D5544C4DBCACC193A60FBFF095AF7500EB5B47A20",
"feeds-filter.min.js": "9E8BC1A669D97992E888A3154FCE64912CE0B7A303D6BE40C3CA0C71A9533B96",
"feeds-filter-card.vue.min.js": "E995F9C93BA50983AAAFB2DE45848769C78FC0E39A34655FA98586DFE670670B",
"feeds-translate.min.css": "704EF1AAE13C4F7D33244E0EC30069AE449C4DBA0310E94C6A6B6ECC33570E5E",
@ -114,8 +115,8 @@
"full-tweets-title.min.js": "DD57BB732ABEF7739CA84AEFF97E86F8984FCC4A8A75B957213622350B2A7C37",
"gbk.min.js": "872D7A4562F13A539C4A9AF1825DE89E610C775F1AD026EA6986A80DD74E4B53",
"get-number.min.js": "7B81A45D0F7D7F68CC6EDE25E02FCD76F8A05B2CF29274F94A99980BB23D8B76",
"gui-settings.min.css": "E6FC86CF2E4982F549F60379AFF7BBC45527923DF730E6112085709C4F893992",
"gui-settings.min.html": "0F4D3D7558CC547D11DB5897B33EADC693BCD012B05FBBB421BA305555E209D7",
"gui-settings.min.css": "F4A6C927F3EEFA876C753E9348259D138C96F6A59DE4453275E222ABAAEC9667",
"gui-settings.min.html": "FC7F12C8CA92DBAA34663AEB476E9D483420117AD688FAD0A9D89F66B25C2522",
"gui-settings.min.js": "CB6035E301389BE5C4BAD9385135663B0E54ACD0A0B39FFE52C266980E0424FC",
"haruna-scale.min.js": "FD079C86741F614FD63E733CF9B7B896A7D20110754815A540F3341D4DC252B2",
"hide-bangumi-reviews.min.js": "7265C0CE994FDA926355A9A4F9B207E7E68E749D47332F3C537EF93E97927A23",
@ -166,21 +167,21 @@
"old-tweets.min.js": "387152B26384B0900985F527112841CC00A48F507EAA8FA634D13FFA83447A72",
"online-info-row.vue.min.js": "4707798C1C08F1704142BAEFE43CB4DA3060352A66B0F1A6BFE5A77F8486A195",
"outer-watchlater.min.css": "B40E94BADA1A9BC96422777B33150780330763098B539921DA05F9D3BA487424",
"outer-watchlater.min.js": "BC429FF8E5012F68B57F5E918DECB73E93CE62C59A9B01205F4396DF27B3E2D4",
"outer-watchlater.min.js": "799E5F280D09562571AC1A9AE15E788A7134D75D4173DFEBC414FE8047DC5502",
"override-navbar.min.css": "E5AA612841281169CA367A238FB934F807900A385CE2298B7352FF3CA4623757",
"override-navbar.min.js": "E55F4EF066461D98ADB1C1582A716C8E179DC78DED8E71D3E9757B25444C2C5E",
"pako-inflate.min.js": "3C55C3DF869249CDCF8489FBC96DFCA2AB7961554909DD55D39E7133DA074315",
"player-focus.min.js": "A64917B3EB83D73948E9502E8CD3C5D9A3FEC08B5F52B2D291A375B9F166C02D",
"player-focus.min.js": "538E13A87C347D2E78FB332A5CFDE37FF6A85EA8573C4A8AAE227497FF6CB7D5",
"player-on-top.min.js": "B4954610299F27FA54245BB58782E4FA1E2E81FF2F813A774F633A8A5E243643",
"player-shadow.min.js": "918D2127907BC2C164CB86BF7F9C2501CF3B9CD236FEEDE5155B9B5D932F3415",
"quality-errors.min.js": "D56E0659B5F06447579128F9DBD825D40E1659252DDAD358B60E071613AAB2BE",
"quick-favorite.min.css": "F14B5ED3F95E944E55B06FEAFF0AC04306146FE9F9223B2C49CE3D507849BE6B",
"quick-favorite.min.js": "64006E6C0678AE094522A84B224B5DCFA52EBFE4BC0347FDBD524CE3EB407D34",
"quick-favorite.min.js": "A68C33151E3B6E0EA73143FDB29E7F34EBE3496D9C40B2C0358466B3FAB63322",
"rank-list.vue.min.js": "EA112025FE267F33FEA4320754C665A1694104FE6AE280AA171B8B0409BBDCCF",
"record-live-danmaku.min.js": "2590A564ADD42BBB34E957B92728EBBE85A644A8E0F94ACDE69B55E3FF1C3889",
"record-live-danmaku.vue.min.js": "740784A24CD5326095C269FD33A5B498ADAAF03FE31B136060888D7E7B616BD3",
"remove-promotions.min.css": "9B9A4CB79531B02BE0A0D6E19FEF5B51CC396131EEA826407013BB1EE4A06FCF",
"remove-promotions.min.js": "ADAC6D96409BA013D21D97D83E8C5DE4DCEA1A590ED916F7122ABC678E3A8FB3",
"remove-promotions.min.css": "524327BDED373CE4F4FDDB32009D685100BA186B089648D5EAC7AD68512BFDBC",
"remove-promotions.min.js": "47D864E7CF96C5ED714E6903B6CB241880A5B9A696D888744F307D664844A858",
"remove-top-mask.min.js": "A15C1EC10D2E1A61845B1ADAE51860553F96427059E10443B1E53FAF48F45304",
"remove-watermark.min.js": "5A63C694BB9E68EA9FDA394D61D227FA31A504E31783C62BF42AACC3FC78C8C4",
"reorder.min.js": "C52DEC9C8962AEC9E824913788BDACFCAB1E43356056658F884EE707508629D2",
@ -191,6 +192,7 @@
"search.vue.min.js": "050019AC283F730181913EBE2D4AD0F89D6E1F0D607A06482652937946390B86",
"seeds-to-coins.min.js": "52A9FA3E9294085510D4726CD519152606C93FE980596E9F493C7E994B9A9763",
"selectable-column-text.min.js": "2FEC93903E277F730BD37C655B01CBDB059DEC46B78DB53B4EB383B3F87DB0A3",
"seo-jump.min.js": "414B1FAEBA18FAC684BA5D68A0EB909A2DF01308769BE7EB920A4DAF5AFA4EB7",
"settings-search.min.js": "85DCBBCED1A8CCCCBF5915D20D017DFFFBA709A49F9C1C9DA8CBA75ACC453B09",
"settings-side-bar.min.js": "3BD1206BBB3F000890A3588F630F3040272375688B5B35D7618B3F9C021309FA",
"settings-tooltip.en-US.min.js": "507DAE457924522B4F8B3225EF1774B2B848A8A8855C8E745670E34A621E309A",
@ -205,7 +207,7 @@
"simple-home.vue.min.js": "1F5CF46DEE65549A30C5F0790578EED0C6B3AD6C5F20D9B88CD745C4B7664ABB",
"simple-home-bangumi-category.vue.min.js": "87DCA2C8295CAD66C9FA01D65437EC2F9DD5E7F4A565B4384ABAB1746A6787EE",
"simple-home-categories.vue.min.js": "C3347E1412E971E81CCCEFF96C90F6CCA9CD8893FE8860CBA98F9562965A02C6",
"simple-home-feeds.vue.min.js": "DF5616626846E62E258BE40BE0AC6A5B39157E3C32C9318A854F3B1FBDD0C8CB",
"simple-home-feeds.vue.min.js": "C1593338AECD2C8E172829E423608177C5CCBF51868E6CBE9BDEB8862D4890DF",
"simple-home-normal-category.vue.min.js": "55B700EF840DBD1E9F5C249739DC24F80B4FEF96082169EC484E944A5189D6E6",
"simplify-home.min.css": "50F0FA046D61ECE5183409CF97C8DBECB4CF64918DF813CD2B39BF9FBD314B42",
"simplify-home.min.js": "F6D7F8E0D45847C3E056711AECE3832785603E7EF85A4B995C028F5CBE539C94",
@ -230,14 +232,14 @@
"touch-player.min.css": "3C0D6F29DF520EB4397C0B996B14B6B2B7AD81145BC62C70B0249402A8AB70A0",
"touch-player.min.js": "0307516FD221386DA37F9C48223BA0E242BF52EF48F46D18A033042351968E94",
"trending-videos.min.js": "1ED73F10D5A7C409CCBF91A97FBB0DE2AA16426F2216DF75F904E8A6389A46E9",
"trending-videos.vue.min.js": "772F8FD556C1DD9E457B7F64F5B8B1753FD92E30426F847688D8E2C4EB49FDFD",
"trending-videos.vue.min.js": "6B53E8C65270907514BB89BEF8919F21D956C3AD167438C3F3520D01A410B2FB",
"tweets.min.css": "9015C1F165C91B9205ABBE4E8A3B5FA83DB1EB4B5CF2442846AF61E44FF178A8",
"url-params-clean.min.js": "E1A9E7A073B584B5B65C952D0DA1EA732CE743E0680BFE945DA9306086F220C8",
"v-checkbox.vue.min.js": "A23C35D5627009A29FD396A024442A19E37DEE70674BF3CE0FA377D781ED2231",
"v-dropdown.vue.min.js": "BA1142E2D44CC9593DA803CAA76FA2B814CBD65D4D4210ABF00E811C361D8A37",
"video-card.vue.min.js": "E67A429519E70AB872B0EF8DB9B5A6992F0C474E98AAEC12468F41C982ABD9C5",
"video-card-info.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
"video-dash.min.js": "F0496F0EBC6002171ECF4F8E049791596029AB622A58FE167959C32430043DE6",
"video-dash.min.js": "DD85855581048237B51B2BD6BFEAFB993172DA7DF8E2B0CFEBCF449FDB82F6A6",
"video-downloader-fragment.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
"video-info.min.js": "99E06DD08BE4B3BA649B8E5C4F81078F83F852E1F43A16199CE67F65BC769AEE",
"video-list.vue.min.js": "90C4CCAB3C9C3FB0CFE39C9A9482C3A964EE7FAC17F7FBF682CCC2FEFB6632F2",

Binary file not shown.

View File

@ -1 +1 @@
(()=>{return(r,e)=>{}})();
(()=>{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;r.forEach(e=>{e.items.forEach(e=>t(e));o.push(t);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}}}})();

2
min/comment.min.css vendored

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 r=()=>{SpinQuery.select(".custom-scrollbar").then(e=>e&&e.classList.remove("custom-scrollbar"))};const l=()=>{document.body.classList.remove("dark");t.removeStyle("darkStyleNavBar");t.removeStyle("darkStyle");t.removeStyle("darkStyleImportant")};const o=["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects"];const a=()=>{if(e.noDarkOnMember&&o.some(e=>{if(typeof e==="string"){return document.URL.replace(location.search,"").includes(e)}else{return e.test(document.URL.replace(location.search,""))}})){l();return}document.body.classList.add("dark");r();if(!e.useDarkStyleAsUserStyle){t.applyImportantStyle("darkStyleNavBar");t.applyStyle("darkStyle");t.applyImportantStyle("darkStyleImportant")}};a();addSettingsListener("useDarkStyleAsUserStyle",()=>{l();a()});return{reload:a,unload:l}}})();
(()=>{return(e,t)=>{const r=()=>{SpinQuery.select(".custom-scrollbar").then(e=>e&&e.classList.remove("custom-scrollbar"))};const l=()=>{document.body.classList.remove("dark");t.removeStyle("darkStyleNavBar");t.removeStyle("darkStyle");t.removeStyle("darkStyleImportant")};const o=["//member.bilibili.com/v2","//member.bilibili.com/video/upload.html","//member.bilibili.com/article-text/home","//www.bilibili.com/audio/submit/","//member.bilibili.com/studio/bs-editor/projects","//www.bilibili.com/s/video/"];const i=()=>{if(e.noDarkOnMember&&o.some(e=>{if(typeof e==="string"){return document.URL.replace(location.search,"").includes(e)}else{return e.test(document.URL.replace(location.search,""))}})){l();return}document.body.classList.add("dark");r();if(!e.useDarkStyleAsUserStyle){t.applyImportantStyle("darkStyleNavBar");t.applyStyle("darkStyle");t.applyImportantStyle("darkStyleImportant")}};i();addSettingsListener("useDarkStyleAsUserStyle",()=>{l();i()});return{reload:i,unload:l}}})();

2
min/dark.min.css vendored

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(t,e)=>{let n=true;const i="disable-feeds-details-style";const a=`\n.card[data-did] .content { cursor: text }\n.card[data-did] .content .details {\n font-size: 12px;\n opacity: 0.6;\n cursor: pointer;\n display: block;\n}\n`;e.applyImportantStyleFromText(".card[data-did] .content .details { display: none }","disable-feeds-details-init-style");const s=()=>e.applyImportantStyleFromText(a,i);const r=document.URL.replace(location.search,"");const c=r.startsWith("https://t.bilibili.com/")||r.startsWith("https://space.bilibili.com/");(async()=>{if(!c){return}s();const{feedsCardsManager:t,feedsCardTypes:i}=await e.importAsync("feeds-apis");const a=await t.startWatching();if(!a){console.error("feedsCardsManager.startWatching() failed");return}const r=t=>{const e=t.element;e.addEventListener("click",t=>{if(t.ctrlKey||!n){return}const i=dqa(e,".content");const a=t.target;if(a.hasAttribute("click-title")){return}if(i.some(t=>t===a||t.contains(a))){t.stopImmediatePropagation()}},{capture:true});const i=dq(e,".post-content");if(!i){return}if(dq(i,".video-container")||dq(i,".bangumi-container")){return}if(dq(i,".details")){return}if(i.classList.contains("repost")){const t=dq(i,".content");const e=document.createElement("div");e.classList.add("details");e.setAttribute("click-title","详情");e.innerHTML=`\n 详情<i class="mdi mdi-chevron-right" click-title></i>\n`;t.insertAdjacentElement("beforeend",e)}};t.cards.forEach(r);t.addEventListener("addCard",t=>{const e=t.detail;r(e)})})();return{reload:()=>{if(c){s();n=true}},unload:()=>{if(c){const t=document.getElementById(i);t&&t.remove();n=false}}}}})();
(()=>{return(t,e)=>{let n=true;const i="disable-feeds-details-style";const a=`\n.card[data-did] .content { cursor: text }\n.card[data-did] .content .details {\n font-size: 12px;\n opacity: 0.6;\n cursor: pointer;\n display: block;\n}\n`;e.applyImportantStyleFromText(".card[data-did] .content .details { display: none }","disable-feeds-details-init-style");const s=()=>e.applyImportantStyleFromText(a,i);const r=document.URL.replace(location.search,"");const c=r.startsWith("https://t.bilibili.com/")||r.startsWith("https://space.bilibili.com/");(async()=>{if(!c){return}s();const{feedsCardsManager:t,feedsCardTypes:i}=await e.importAsync("feeds-apis");const a=await t.startWatching();if(!a){console.error("feedsCardsManager.startWatching() failed");return}const r=t=>{const e=t.element;e.addEventListener("click",t=>{if(t.ctrlKey||!n){return}const i=dqa(e,".content");const a=t.target;if(a.hasAttribute("click-title")){return}if(i.some(t=>t===a||t.contains(a))){t.stopImmediatePropagation()}},{capture:true});const i=dq(e,".post-content");if(!i){return}if(dq(i,".video-container")||dq(i,".bangumi-container")){return}if(dq(i,".details")){return}if(i.classList.contains("repost")){const t=dq(i,".content");if(!t){return}const e=document.createElement("div");e.classList.add("details");e.setAttribute("click-title","详情");e.innerHTML=`\n 详情<i class="mdi mdi-chevron-right" click-title></i>\n`;t.insertAdjacentElement("beforeend",e)}};t.cards.forEach(r);t.addEventListener("addCard",t=>{const e=t.detail;r(e)})})();return{reload:()=>{if(c){s();n=true}},unload:()=>{if(c){const t=document.getElementById(i);t&&t.remove();n=false}}}}})();

View File

@ -1 +1 @@
(()=>{return(e,t)=>{class n{constructor(e={}){this.config=e;this.entries=[]}download(e,t){const a=document.createElement("a");const i=URL.createObjectURL(t);if(n.lastPackageUrl){URL.revokeObjectURL(n.lastPackageUrl)}n.lastPackageUrl=i;a.setAttribute("href",i);a.setAttribute("download",escapeFilename(e));document.body.appendChild(a);a.click();a.remove()}add(e,t){if(t===null||t===undefined){return}this.entries.push({name:escapeFilename(e),data:t})}async blob(){if(this.entries.length===0){return null}if(this.entries.length===1){const e=this.entries[0].data;return typeof e==="string"?new Blob([e]):e}const e=new JSZip;this.entries.forEach(({name:t,data:n})=>{e.file(t,n)});return await e.generateAsync({type:"blob"})}async emit(e){if(this.entries.length===0){return}if(!e||this.entries.length===1){e=this.entries[0].name}const t=await this.blob();if(!t){return}return this.download(e,t)}static async single(e,t,a={}){const i=new n(a);i.add(e,t);return await i.emit()}}n.lastPackageUrl="";return{export:{DownloadVideoPackage:n}}}})();
(()=>{return(e,t)=>{class n{constructor(e={}){this.config=e;this.entries=[]}download(e,t){const a=document.createElement("a");const i=URL.createObjectURL(t);if(n.lastPackageUrl){URL.revokeObjectURL(n.lastPackageUrl)}n.lastPackageUrl=i;a.setAttribute("href",i);a.setAttribute("download",escapeFilename(e));document.body.appendChild(a);a.click();a.remove()}add(e,t){if(t===null||t===undefined){return}console.log(`add file: ${escapeFilename(e)}`);this.entries.push({name:escapeFilename(e),data:t})}async blob(){if(this.entries.length===0){return null}if(this.entries.length===1){const e=this.entries[0].data;return typeof e==="string"?new Blob([e]):e}const e=new JSZip;this.entries.forEach(({name:t,data:n})=>{e.file(t,n)});return await e.generateAsync({type:"blob"})}async emit(e){if(this.entries.length===0){return}if(!e||this.entries.length===1){e=this.entries[0].name}const t=await this.blob();if(!t){return}return this.download(e,t)}static async single(e,t,a={}){const i=new n(a);i.add(e,t);return await i.emit()}}n.lastPackageUrl="";return{export:{DownloadVideoPackage:n}}}})();

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(t,e)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")||!getUID()){return}await SpinQuery.condition(()=>dq(".video-toolbar .ops .collect"),t=>{return t!==null&&t.innerText!=="--"});const t=dq(".video-toolbar .ops .collect");if(!t){return}e.applyStyle("outerWatchlaterStyle");t.insertAdjacentHTML("afterend",`\n<span title='稍后再看' class='watchlater' :class="{on: isInWatchlater}" @click="toggle()">\n<i class='mdi mdi-timetable'></i>\n 稍后再看\n<div class='tip' :class="{show: tipShowing}">{{tipText}}</div>\n</span>\n`);const i=dq(".ops .watchlater");if(!i){return}const a=new Vue({el:i,store:store,data:{aid:unsafeWindow.aid,tipText:"",tipShowing:false,tipHandle:0},computed:{...Vuex.mapState(["watchlaterList"]),isInWatchlater(){return this.watchlaterList.includes(parseInt(this.aid))}},methods:{...Vuex.mapActions(["toggleWatchlater"]),showTip(t){this.tipText=t;this.tipShowing=true;if(this.tipHandle){clearTimeout(this.tipHandle)}this.tipHandle=setTimeout(()=>{this.tipShowing=false},2e3)},async toggle(){await this.toggleWatchlater(this.aid);this.showTip(this.isInWatchlater?"已添加至稍后再看":"已从稍后再看移除")}}});Observer.videoChange(()=>{a.aid=unsafeWindow.aid})})();return{unload:()=>{dqa(".ops .watchlater").forEach(t=>t.style.display="none")},reload:()=>{dqa(".ops .watchlater").forEach(t=>t.style.display="inline-block")}}}})();
(()=>{return(t,e)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")||!getUID()){return}await playerReady();const t=dq(".video-toolbar .ops .collect");if(!t){return}e.applyStyle("outerWatchlaterStyle");t.insertAdjacentHTML("afterend",`\n<span title='稍后再看' class='watchlater' :class="{on: isInWatchlater}" @click="toggle()">\n<i class='mdi mdi-timetable'></i>\n 稍后再看\n<div class='tip' :class="{show: tipShowing}">{{tipText}}</div>\n</span>\n`);const a=dq(".ops .watchlater");if(!a){return}const i=new Vue({el:a,store:store,data:{aid:unsafeWindow.aid,tipText:"",tipShowing:false,tipHandle:0},computed:{...Vuex.mapState(["watchlaterList"]),isInWatchlater(){return this.watchlaterList.includes(parseInt(this.aid))}},methods:{...Vuex.mapActions(["toggleWatchlater"]),showTip(t){this.tipText=t;this.tipShowing=true;if(this.tipHandle){clearTimeout(this.tipHandle)}this.tipHandle=setTimeout(()=>{this.tipShowing=false},2e3)},async toggle(){await this.toggleWatchlater(this.aid);this.showTip(this.isInWatchlater?"已添加至稍后再看":"已从稍后再看移除")}}});Observer.videoChange(()=>{i.aid=unsafeWindow.aid})})();return{unload:()=>{dqa(".ops .watchlater").forEach(t=>t.style.display="none")},reload:()=>{dqa(".ops .watchlater").forEach(t=>t.style.display="inline-block")}}}})();

View File

@ -1 +1 @@
(()=>{return(o,e)=>{const n=document.URL.includes("bangumi")?"#bofqi":".video-info .video-title .tit";SpinQuery.select(n).then(async e=>{await SpinQuery.condition(()=>dq(".video-toolbar .ops .collect,.tool-bar .coin-info"),o=>{return o!==null&&o.innerText!=="--"});console.log(e);if(e===null){return}e.scrollIntoView();if(o.playerFocusOffset!==0){window.scrollBy(0,o.playerFocusOffset)}console.log(e.offsetTop,o.playerFocusOffset,window.scrollY)})}})();
(()=>{return(e,o)=>{const l=document.URL.includes("bangumi")?"#bofqi":".video-info .video-title .tit";SpinQuery.select(l).then(async o=>{await playerReady();console.log(o);if(o===null){return}o.scrollIntoView();if(e.playerFocusOffset!==0){window.scrollBy(0,e.playerFocusOffset)}console.log(o.offsetTop,e.playerFocusOffset,window.scrollY)})}})();

View File

@ -1 +1 @@
(()=>{return(i,t)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")||!getUID()){return}await SpinQuery.condition(()=>dq(".video-toolbar .ops .collect"),i=>{return i!==null&&i.innerText!=="--"});const e=dq(".video-toolbar .ops .collect");if(!e){return}t.applyStyle("quickFavoriteStyle");const s=`\n<span @click.left.self="toggle()" @click.right.prevent.self="listShowing = !listShowing" class="quick-favorite" :class="{ on: isFavorite }">\n<i @click.left="toggle()" @click.right.prevent="listShowing = !listShowing"></i>\n<div style="display: inline" @click.left="toggle()" @click.right.prevent="listShowing = !listShowing">快速收藏</div>\n</template>\n<div class="select-list" ref="selectList" :class="{ show: listShowing }">\n 选择快速收藏夹:\n<div v-if="lists.length > 0" class="lists">\n<v-dropdown :items="lists.map(it => it.title)" :value.sync="selectedFavorite"></v-dropdown>\n</div>\n<div class="lists-loading" v-else>加载中...</div>\n</div>\n<div class="lists-tip" :class="{ show: listShowing }">右键点击快速收藏可再次打开</div>\n<div class="tip" :class="{ show: tipShowing }">{{tipText}}</div>\n</span>\n`;if(i.outerWatchlater){const i=await SpinQuery.select(".ops .watchlater");if(i!==null){i.insertAdjacentHTML("beforebegin",s)}else{e.insertAdjacentHTML("afterend",s)}}else{e.insertAdjacentHTML("afterend",s)}const a=dq(".ops .quick-favorite");if(!a){return}const o=new Vue({el:a,store:store,components:{VDropdown:()=>t.importAsync("v-dropdown.vue")},data:{aid:unsafeWindow.aid,favoriteTitle:"",isFavorite:false,tipText:"",tipShowing:false,tipHandle:0,lists:[],selectedFavorite:"",listShowing:false},async created(){this.syncFavoriteState()},watch:{selectedFavorite(t){if(this.lists.length===0){return}const e=this.lists;const s=e.find(i=>i.title===t);if(s){i.quickFavoriteID=s.id;this.syncFavoriteState()}else{console.error("list not found in selectedFavorite(value)")}},async listShowing(i){if(i){document.addEventListener("click",i=>{const t=this.$el;const e=i.target;if(e!==t&&!t.contains(e)){this.listShowing=false}});if(this.lists.length===0){try{const i=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${getUID()}&is_space=0`);if(i.code!==0){throw new Error(`获取收藏夹列表失败: ${i.message}`)}this.lists=_.get(i,"data.list",[])}catch(i){logError(i)}}}}},methods:{async syncFavoriteState(){if(i.quickFavoriteID===0){return}try{const t=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/v3/fav/folder/created/list-all?type=2&rid=${this.aid}&up_mid=${getUID()}`);if(t.code!==0){throw new Error(`获取收藏状态失败: ${t.message}`)}const e=_.get(t,"data.list",[]);const s=e.find(t=>t.id===i.quickFavoriteID);this.isFavorite=Boolean(s.fav_state);this.selectedFavorite=this.favoriteTitle=s.title}catch(i){logError(i)}},showTip(i){this.tipText=i;this.tipShowing=true;if(this.tipHandle){clearTimeout(this.tipHandle)}this.tipHandle=setTimeout(()=>{this.tipShowing=false},2e3)},async toggle(){if(i.quickFavoriteID===0){this.listShowing=true;return}const t={rid:this.aid,type:2,add_media_ids:"",del_media_ids:"",csrf:getCsrf()};t[this.isFavorite?"del_media_ids":"add_media_ids"]=i.quickFavoriteID.toString();try{await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v3/fav/resource/deal`,Object.entries(t).map(([i,t])=>`${i}=${t}`).join("&"));this.isFavorite=!this.isFavorite;this.showTip(this.isFavorite?`已添加至收藏夹: ${this.favoriteTitle}`:`已移出收藏夹: ${this.favoriteTitle}`)}catch(i){Toast.error(`快速收藏失败: ${i.message}`,"快速收藏");console.error(i)}}}});Observer.videoChange(()=>{o.aid=unsafeWindow.aid;o.syncFavoriteState()})})();return{unload:()=>{dqa(".ops .quick-favorite").forEach(i=>i.style.display="none")},reload:()=>{dqa(".ops .quick-favorite").forEach(i=>i.style.display="inline-block")}}}})();
(()=>{return(i,t)=>{(async()=>{if(!document.URL.startsWith("https://www.bilibili.com/video/")||!getUID()){return}await playerReady();const e=dq(".video-toolbar .ops .collect");if(!e){return}t.applyStyle("quickFavoriteStyle");const s=`\n<span @click.left.self="toggle()" @click.right.prevent.self="listShowing = !listShowing" class="quick-favorite" :class="{ on: isFavorite }">\n<i @click.left="toggle()" @click.right.prevent="listShowing = !listShowing"></i>\n<div style="display: inline" @click.left="toggle()" @click.right.prevent="listShowing = !listShowing">快速收藏</div>\n</template>\n<div class="select-list" ref="selectList" :class="{ show: listShowing }">\n 选择快速收藏夹:\n<div v-if="lists.length > 0" class="lists">\n<v-dropdown :items="lists.map(it => it.title)" :value.sync="selectedFavorite"></v-dropdown>\n</div>\n<div class="lists-loading" v-else>加载中...</div>\n</div>\n<div class="lists-tip" :class="{ show: listShowing }">右键点击快速收藏可再次打开</div>\n<div class="tip" :class="{ show: tipShowing }">{{tipText}}</div>\n</span>\n`;if(i.outerWatchlater){const i=await SpinQuery.select(".ops .watchlater");if(i!==null){i.insertAdjacentHTML("beforebegin",s)}else{e.insertAdjacentHTML("afterend",s)}}else{e.insertAdjacentHTML("afterend",s)}const a=dq(".ops .quick-favorite");if(!a){return}const o=new Vue({el:a,store:store,components:{VDropdown:()=>t.importAsync("v-dropdown.vue")},data:{aid:unsafeWindow.aid,favoriteTitle:"",isFavorite:false,tipText:"",tipShowing:false,tipHandle:0,lists:[],selectedFavorite:"",listShowing:false},async created(){this.syncFavoriteState()},watch:{selectedFavorite(t){if(this.lists.length===0){return}const e=this.lists;const s=e.find(i=>i.title===t);if(s){i.quickFavoriteID=s.id;this.syncFavoriteState()}else{console.error("list not found in selectedFavorite(value)")}},async listShowing(i){if(i){document.addEventListener("click",i=>{const t=this.$el;const e=i.target;if(e!==t&&!t.contains(e)){this.listShowing=false}});if(this.lists.length===0){try{const i=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=100&up_mid=${getUID()}&is_space=0`);if(i.code!==0){throw new Error(`获取收藏夹列表失败: ${i.message}`)}this.lists=_.get(i,"data.list",[])}catch(i){logError(i)}}}}},methods:{async syncFavoriteState(){if(i.quickFavoriteID===0){return}try{const t=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/v3/fav/folder/created/list-all?type=2&rid=${this.aid}&up_mid=${getUID()}`);if(t.code!==0){throw new Error(`获取收藏状态失败: ${t.message}`)}const e=_.get(t,"data.list",[]);const s=e.find(t=>t.id===i.quickFavoriteID);if(s===undefined){i.quickFavoriteID=0;return}this.isFavorite=Boolean(s.fav_state);this.selectedFavorite=this.favoriteTitle=s.title}catch(i){logError(i)}},showTip(i){this.tipText=i;this.tipShowing=true;if(this.tipHandle){clearTimeout(this.tipHandle)}this.tipHandle=setTimeout(()=>{this.tipShowing=false},2e3)},async toggle(){if(i.quickFavoriteID===0){this.listShowing=true;return}const t={rid:this.aid,type:2,add_media_ids:"",del_media_ids:"",csrf:getCsrf()};t[this.isFavorite?"del_media_ids":"add_media_ids"]=i.quickFavoriteID.toString();try{await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v3/fav/resource/deal`,Object.entries(t).map(([i,t])=>`${i}=${t}`).join("&"));this.isFavorite=!this.isFavorite;this.showTip(this.isFavorite?`已添加至收藏夹: ${this.favoriteTitle}`:`已移出收藏夹: ${this.favoriteTitle}`)}catch(i){Toast.error(`快速收藏失败: ${i.message}`,"快速收藏");console.error(i)}}}});Observer.videoChange(()=>{o.aid=unsafeWindow.aid;o.syncFavoriteState()})})();return{unload:()=>{dqa(".ops .quick-favorite").forEach(i=>i.style.display="none")},reload:()=>{dqa(".ops .quick-favorite").forEach(i=>i.style.display="inline-block")}}}})();

View File

@ -1 +1 @@
#home_popularize .adpos,#home_popularize .l-con,#reportFirst2 .extension,#slide_ad,.bili-header-m .nav-menu .nav-con .nav-item .text-red,.bilibili-player-promote-wrap,.bypb-window .operate-card,.gg-floor-module,.gg-window .operate-card,.home-app-download,.international-home .banner-card,.mascot,.mobile-link-l,.video-page-game-card,.video-page-special-card,body.remove-game-match-module #reportFirst3,body.remove-game-match-module .bili-wrapper>.home-match,body:not(.preserve-event-banner) .activity-m{display:none!important}#home_popularize{position:relative!important}.gg-window .online,.popularize-module .online{position:absolute!important;top:50%!important;right:.5%!important;transform:translateY(-100%)!important}.gg-window .online{right:0!important;padding:0 16px!important}#reportFirst2{position:relative;margin-bottom:4px}.blocked-ads{width:440px;height:220px;display:flex;color:#888;background-color:#8882;font-size:24pt;font-weight:700;align-items:center;justify-content:space-evenly}.blocked-ads.new{width:100%;height:100%;background-color:#eee}body.dark .blocked-ads.new{background-color:#333}body.compact .blocked-ads{width:480px;height:240px}
#home_popularize .adpos,#home_popularize .l-con,#reportFirst2 .extension,#slide_ad,.bili-header-m .nav-menu .nav-con .nav-item .text-red,.bilibili-player-promote-wrap,.bypb-window .operate-card,.gg-floor-module,.gg-window .operate-card,.home-app-download,.international-home .banner-card,.mascot,.mobile-link-l,.video-page-game-card,.video-page-special-card,body.remove-game-match-module #reportFirst3,body.remove-game-match-module .bili-wrapper>.home-match,body:not(.preserve-event-banner) .activity-m{display:none!important}#home_popularize{position:relative!important}.gg-window .online,.popularize-module .online{position:absolute!important;top:50%!important;right:.5%!important;transform:translateY(-100%)!important}.gg-window .online{right:0!important;padding:0 16px!important}#reportFirst2{position:relative;margin-bottom:4px}.blocked{width:440px;height:220px;display:flex;color:#888;background-color:#8882;font-size:24pt;font-weight:700;align-items:center;justify-content:space-evenly}.blocked.new{width:100%;height:100%;background-color:#eee}body.dark .blocked.new{background-color:#333}body.compact .blocked{width:480px;height:240px}

View File

@ -1 +1 @@
(()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://www.bilibili.com/"){addSettingsListener("removeGameMatchModule",e=>{document.body.classList.toggle("remove-game-match-module",e)},true);SpinQuery.any(()=>dqa(".gg-pic"),t=>{t.forEach(t=>{const n=t.parentElement;n.style.display="none";const l=[...n.parentElement.childNodes].indexOf(n)+1;const s=n.parentElement.parentElement.querySelector(`.pic li:nth-child(${l})`);if(s){s.style.display="flex";const t=s.querySelector("a:not(.more-text)");t.insertAdjacentHTML("afterend",`\n<div class="blocked-ads">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`);t.style.visibility="hidden";s.querySelector("a.more-text").style.display="none";s.querySelector("img").style.display="none"}})});SpinQuery.select(".focus-carousel.home-slide").then(t=>{if(!t){return}[...t.querySelectorAll(".gg-icon,.bypb-icon")].map(e=>e.parentElement.parentElement).forEach(t=>{t.style.display="none";t.insertAdjacentHTML("afterend",`\n<div class="blocked-ads new">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`)})})}addSettingsListener("preserveEventBanner",e=>{document.body.classList.toggle("preserve-event-banner",e)},true)}})();
(()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://www.bilibili.com/"){addSettingsListener("removeGameMatchModule",e=>{document.body.classList.toggle("remove-game-match-module",e)},true);SpinQuery.any(()=>dqa(".gg-pic"),t=>{t.forEach(t=>{const n=t.parentElement;n.style.display="none";const l=[...n.parentElement.childNodes].indexOf(n)+1;const i=n.parentElement.parentElement.querySelector(`.pic li:nth-child(${l})`);if(i){i.style.display="flex";const t=i.querySelector("a:not(.more-text)");t.insertAdjacentHTML("afterend",`\n<div class="blocked">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`);t.style.visibility="hidden";i.querySelector("a.more-text").style.display="none";i.querySelector("img").style.display="none"}})});SpinQuery.select(".focus-carousel.home-slide").then(t=>{if(!t){return}[...t.querySelectorAll(".gg-icon,.bypb-icon")].map(e=>e.parentElement.parentElement).forEach(t=>{t.style.display="none";t.insertAdjacentHTML("afterend",`\n<div class="blocked new">${e.showBlockedAdsTip?"🚫已屏蔽广告":""}</div>\n`)})})}addSettingsListener("preserveEventBanner",e=>{document.body.classList.toggle("preserve-event-banner",e)},true)}})();

1
min/seo-jump.min.js vendored Normal file
View File

@ -0,0 +1 @@
(()=>{return(i,t)=>{if(document.URL.startsWith("https://www.bilibili.com/s/video/")){window.location.assign(document.URL.replace("/s",""))}}})();

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);const e=this.$refs.contents;const{enableHorizontalScroll:a}=await t.importAsync("horizontal-scroll");a(e)}})}}})();
(()=>{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)}})}}})();

View File

@ -1 +1 @@
(()=>{return(e,t)=>{const n=`<div class=trendings><div class=header><div class=title>热门</div><div class=page><div class=prev-page @click=scroll(-1)><icon type=extended icon=left-arrow></icon></div><div class=next-page @click=scroll(1)><icon type=extended icon=right-arrow></icon></div></div></div><div class=contents ref=contents><div class=card-wrapper v-for="card in trendingCards":key=card.id><video-card :data=card orientation=vertical></video-card></div></div></div>`;t.applyStyleFromText(`.simple-home .trendings{display:flex;flex-direction:column}.simple-home .trendings .header{padding:0 8px}.simple-home .trendings .header .page{display:flex;align-items:center}.simple-home .trendings .header .page>*{display:flex;align-items:center;justify-content:center;padding:4px;background-color:#8882;border-radius:50%;margin-left:8px;cursor:pointer}.simple-home .trendings .header .page>:hover{background-color:#8884}.simple-home .trendings .header .page .prev-page .be-icon{transform:translateX(-1px)}.simple-home .trendings .header .page .next-page .be-icon{transform:translateX(1px)}.simple-home .trendings .contents{--card-width:200px;--card-height:250px;--card-count:3;margin-top:16px;display:flex;overflow:auto;height:calc(var(--card-height) + 16px);width:calc((var(--card-width) + 16px) * var(--card-count));scrollbar-width:none!important}@media screen and (max-width:1300px) and (min-width:900px){.simple-home .trendings .contents{--card-count:2}}@media screen and (max-width:1100px) and (min-width:900px){.simple-home .trendings .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .trendings .contents{--card-count:4}}.simple-home .trendings .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .trendings .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}`,"trending-videos-style");return{export:Object.assign({template:n},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{trendingCards:unsafeWindow.__INITIAL_STATE__.recommendList.map(e=>{return{id:e.aid,aid:e.aid,bvid:e.bvid,timestamp:e.ctime*1e3,time:new Date(e.ctime*1e3),description:e.desc,duration:e.duration,durationText:formatDuration(e.duration),coverUrl:e.pic.replace("http:","https:"),title:e.title,coins:formatCount(e.stat.coin),danmakuCount:formatCount(e.stat.danmaku),like:formatCount(e.stat.like),playCount:formatCount(e.stat.view),upName:e.owner.name,upFaceUrl:e.owner.face.replace("http:","https:")}})}},methods:{scroll(e){const t=this.$refs.contents;const n=getComputedStyle(t);const i=parseFloat(n.getPropertyValue("--card-count"));const r=parseFloat(n.getPropertyValue("--card-width"));const a=16;const o=i*(r+a);t.scrollBy(e*o,0)}},async mounted(){const e=this.$refs.contents;const{enableHorizontalScroll:n}=await t.importAsync("horizontal-scroll");n(e)}})}}})();
(()=>{return(e,t)=>{const n=`<div class=trendings><div class=header><div class=title>热门</div><div class=page><div class=prev-page @click=scroll(-1)><icon type=extended icon=left-arrow></icon></div><div class=next-page @click=scroll(1)><icon type=extended icon=right-arrow></icon></div></div></div><div class=contents ref=contents><div class=card-wrapper v-for="card in trendingCards":key=card.id><video-card :data=card orientation=vertical></video-card></div></div></div>`;t.applyStyleFromText(`.simple-home .trendings{display:flex;flex-direction:column}.simple-home .trendings .header{padding:0 8px}.simple-home .trendings .header .page{display:flex;align-items:center}.simple-home .trendings .header .page>*{display:flex;align-items:center;justify-content:center;padding:4px;background-color:#8882;border-radius:50%;margin-left:8px;cursor:pointer}.simple-home .trendings .header .page>:hover{background-color:#8884}.simple-home .trendings .header .page .prev-page .be-icon{transform:translateX(-1px)}.simple-home .trendings .header .page .next-page .be-icon{transform:translateX(1px)}.simple-home .trendings .contents{--card-width:200px;--card-height:250px;--card-count:3;margin-top:16px;display:flex;overflow:auto;height:calc(var(--card-height) + 16px);width:calc((var(--card-width) + 16px) * var(--card-count));scrollbar-width:none!important}@media screen and (max-width:1300px) and (min-width:900px){.simple-home .trendings .contents{--card-count:2}}@media screen and (max-width:1100px) and (min-width:900px){.simple-home .trendings .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .trendings .contents{--card-count:4}}.simple-home .trendings .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .trendings .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}`,"trending-videos-style");return{export:Object.assign({template:n},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{trendingCards:unsafeWindow.__INITIAL_STATE__.recommendList.map(e=>{return{id:e.aid,aid:e.aid,bvid:e.bvid,timestamp:e.ctime*1e3,time:new Date(e.ctime*1e3),description:e.desc,duration:e.duration,durationText:formatDuration(e.duration),coverUrl:e.pic.replace("http:","https:"),title:e.title,coins:formatCount(e.stat.coin),danmakuCount:formatCount(e.stat.danmaku),like:formatCount(e.stat.like),playCount:formatCount(e.stat.view),upName:e.owner.name,upFaceUrl:e.owner.face.replace("http:","https:")}})}},methods:{scroll(e){const t=this.$refs.contents;const n=getComputedStyle(t);const i=parseFloat(n.getPropertyValue("--card-count"));const r=parseFloat(n.getPropertyValue("--card-width"));const a=16;const o=i*(r+a);t.scrollBy(e*o,0)}},async mounted(){if(!e.simpleHomeWheelScroll){return}const n=this.$refs.contents;const{enableHorizontalScroll:i}=await t.importAsync("horizontal-scroll");i(n)}})}}})();

View File

@ -1 +1 @@
(()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();if(e.audioDashes.length>0){const t=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(t)]}else{return[a(r)]}};const o=async(t,a,r=false)=>{const o=await Ajax.getJsonWithCredentials(t);const s=o.data||o.result||o;if(o.code!==0||!s.dash){throw new Error("此视频没有DASH格式, 请改用FLV格式")}const d=s.accept_quality;if(!d.includes(a)&&!r){throw new Error("没有找到请求的清晰度")}if(s.quality!==a&&!r){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const c=s.accept_description;const n=c[d.indexOf(a)];const i=s.dash.duration;const h=s.dash.video.filter(t=>t.id===(r?s.quality:a)).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:n,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i,videoCodec:e};return r});const u=(s.dash.audio||[]).map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i}});return{videoDashes:h,audioDashes:u}};return{export:{getDashInfo:o,dashToFragments:r}}}})();
(()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();if(e.audioDashes.length>0){const t=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(t)]}else{return[a(r)]}};const o=async(t,a,r=false)=>{const o=await Ajax.getJsonWithCredentials(t);const s=o.data||o.result||o;if(o.code!==0){throw new Error(`API请求失败: ${o.code} ${o.message}`)}if(!s.dash){throw new Error("此视频没有DASH格式, 请改用FLV格式")}const d=s.accept_quality;if(!d.includes(a)&&!r){throw new Error("没有找到请求的清晰度")}if(s.quality!==a&&!r){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const c=s.accept_description;const n=c[d.indexOf(a)];const i=s.dash.duration;const h=s.dash.video.filter(t=>t.id===(r?s.quality:a)).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:n,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i,videoCodec:e};return r});const u=(s.dash.audio||[]).map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i}});return{videoDashes:h,audioDashes:u}};return{export:{getDashInfo:o,dashToFragments:r}}}})();

View File

@ -59,6 +59,9 @@ const enable = url.startsWith('https://t.bilibili.com/') ||
}
if (postContent.classList.contains('repost')) {
const contents = dq(postContent, '.content') as HTMLElement
if (!contents) {
return
}
const details = document.createElement('div')
details.classList.add('details')
details.setAttribute('click-title', '详情')

View File

@ -141,6 +141,9 @@ class FeedsCardsManager extends EventTarget {
// console.log('skip detached card:', card)
return
}
if (this.cards.find(c => c.id === card.id)) {
return
}
this.cards.push(card)
this.cards.sort((a, b) => {
if (a.id === b.id) {
@ -196,6 +199,9 @@ class FeedsCardsManager extends EventTarget {
console.warn(el)
return ''
}
// if (!el.__vue__.card.origin) {
// return ''
// }
if (type === feedsCardTypes.repost) {
const originalCard = JSON.parse(el.__vue__.card.origin)
const originalText = el.__vue__.originCardData.pureText

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name Bilibili Evolved (Preview)
// @version 1.10.31
// @version 1.10.33
// @description Bilibili Evolved 的预览版, 可以抢先体验新功能.
// @author Grant Howard, Coulomb-G
// @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
@ -324,6 +324,7 @@ import { store } from './store'
{
const quickLoads = [
'//live.bilibili.com',
'//www.bilibili.com/s/video',
]
if (quickLoads.some(it => document.URL.includes(it))) {
contentLoaded(applyScripts)

View File

@ -928,5 +928,11 @@ Resource.manifest = {
volumeOverdrive: '音量增幅',
},
},
seoJump: {
path: 'seo-jump.min.js',
displayNames: {
seoJump: 'SEO页面重定向',
},
},
}
export const resourceManifest = Resource.manifest

View File

@ -202,6 +202,7 @@ export const settings = {
customStyles: [],
simpleHomeCategoryOrders: { ...simpleHomeCategoryDefaultOrders },
simpleHomeBangumiLayout: '时间表',
simpleHomeWheelScroll: true,
keymapJumpSeconds: 85,
urlParamsClean: true,
collapseLiveSideBar: true,
@ -241,6 +242,7 @@ export const settings = {
watchLaterRedirectPage: true,
showCoverBeforePlay: false,
volumeOverdrive: false,
seoJump: true,
cache: {},
}
const fixedSettings = {

View File

@ -189,4 +189,10 @@ export const matchPattern = (str, pattern) => {
return str.includes(pattern)
}
return pattern.test(str)
}
}
export const playerReady = () => {
return SpinQuery.condition(
() => parseInt(dq('.video-data .dm').textContent),
it => !Number.isNaN(it),
)
}

View File

@ -1,5 +1,6 @@
@mixin orders {
display: flex;
align-items: center;
.floor {
opacity: 0.7;
order: 1;
@ -7,8 +8,21 @@
.reply {
order: 2;
}
.operation {
.reply-tags {
order: 3;
display: flex !important;
margin: 0 !important;
span {
margin: 0 4px 0 0 !important;
font-size: 12px !important;
line-height: normal !important;
display: flex !important;
height: auto !important;
padding: 2px 6px !important;
}
}
.operation {
order: 4;
flex-grow: 1;
display: flex !important;
justify-content: flex-end;

View File

@ -379,6 +379,7 @@
}
.title {
padding: 10px 10px 0;
margin: 0;
font-size: 11pt;
font-weight: bold;
color: inherit;

View File

@ -190,7 +190,7 @@ export class Activities extends NavbarComponent {
{
name: '番剧',
component: 'bangumi-activity',
moreUrl: 'https://t.bilibili.com/?tab=512',
moreUrl: 'https://t.bilibili.com/?tab=512,4097,4098,4099,4100,4101',
get notifyApi() {
return `https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_num?rsp_type=1&uid=${getUID()}&update_num_dy_id=${Activities.getLatestID()}&type_list=512`
},

View File

@ -161,10 +161,12 @@
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
-webkit-box-align: start;
max-height: 3em;
word-break: break-all;
line-height: 1.5;
overflow: hidden;
margin: 0;
margin-top: 8px;
padding: 0 10px;
&:hover {

View File

@ -221,6 +221,9 @@
overflow: hidden;
text-overflow: ellipsis;
align-self: center;
margin: 0;
line-height: normal;
display: block;
padding-left: 8px;
padding-right: 6px;
font-size: 13px;

View File

@ -182,6 +182,7 @@
word-break: break-all;
line-height: 1.5;
overflow: hidden;
margin: 0;
margin-top: 8px;
padding: 0 10px;
&:hover {

View File

@ -85,7 +85,6 @@ textarea,
.watch-later-list header .d-btn,
.tab-contain,
.card .focus-btn .focus,
.page-container,
.right-side-bar .to-comment .comment-num,
.music-container .image-area .share-img,
.music-container .text-area,
@ -1578,10 +1577,10 @@ ul.filter-disable .icon-copy,
{
filter: brightness(0.16) blur(10px) !important;
}
.bottom-actions .left-action
/* .bottom-actions .left-action
{
filter: brightness(0.8) !important;
}
} */
.user-type-icon .svg-icon.phone-2,
.user-type-icon .svg-icon.not-member-2,
.box-slide-item.expired .box-img,

View File

@ -90,6 +90,9 @@
&-favourite-manga .drop-list .more-btn-container {
@include background-color();
}
.download-app {
@include color("e");
}
}
.ranking-jump,
.manga-title,
@ -119,8 +122,13 @@
}
}
}
.nav-list .nav-item .item-icon {
@include to-theme("blue");
.nav-list .nav-item {
.item-icon {
@include to-theme("blue");
}
.item-underline {
@include theme-background-color();
}
}
.rank-title,
.list-item {
@ -148,6 +156,33 @@
}
.section-navigator {
@include border-color();
@include background-color("4");
.divider {
@include border-color();
}
.back-to-top:hover .icon {
@include to-theme("blue");
}
}
.container {
@include background-color();
.title {
@include color("e");
}
.tab {
@include color("a");
&.active {
@include theme-color();
&:after {
@include theme-background-color();
}
}
}
}
.purchased-comic-item .eq-desc,
.auto-purchase .page-sub-title,
.auto-purchase-item .list-content .comic-content .bought-ep-count {
@include color("a");
}
}
.card-detail .card-item-middle-top {

View File

@ -381,6 +381,7 @@
}
}
.page-container {
@include background-color();
.bangumi-spoiler-container {
@include background-color("4");
@include color("e");
@ -405,7 +406,7 @@
}
.publish-panel {
.core-style {
@include background-color("2");
@include background-color();
@include color("e");
@include border-color();
&:hover,

View File

@ -436,4 +436,89 @@
@include border-color("5");
}
}
}
.fans-medal-item {
.label {
.content {
@include color("2");
}
}
}
.chat-control-panel .bottom{
.content {
@include background-color();
@include color("2");
}
.medal-ctnr {
.title ~ .qs-icon {
@include color("a");
}
}
.medal-wear-body {
.medal-item {
.progress-level-div {
.progress-div {
@include background-color("4");
.progress-num-span {
@include theme-color();
}
&-cover {
@include theme-background-color();
}
}
.level-span {
@include color("a");
}
}
.limit-progress-div {
@include color("a");
}
}
}
.footer-line {
@include border-color("4");
}
.medal-wear-footer {
@include theme-color();
a {
@include theme-color();
}
}
}
.join-fans-body .desc-text p,
.main p span,
.WordSection1 p {
@include color("e");
}
.content-main {
p,
h5,
h6 {
@include color("e");
}
}
.act-rich-style-init .act-rich-render-content {
@include color("e");
p span {
@include color("a");
}
}
.long-page .page-content {
@include background-color();
@include color("e");
@include border-color("4");
h1,
.strong {
@include color("e");
}
}
.bb-comment .comment-list .list-item .info .reply-tags span {
@include background-color("3");
@include color("a");
}
.bilibili-player-video-sendbar {
&-left,
&-right {
@include background-color("4");
}
}

View File

@ -1251,7 +1251,7 @@ li.season-item .season-body .season-title span.follow,
.sponsor-rank-item.special .sp-right .sp-msg > span,
.sponsor-rank-item.special .sp-right .sp-msg > span:before,
.home-level-mask-icon,
.top-header,
/*.top-header,*/
.bangumi-coin-wrap .bangumi-coin, .bangumi-coin-wrap .bangumi-coin-d,
.bangumi-collection-wrap .bangumi-order, .bangumi-collection-wrap .bangumi-order-d,
.bangumi-order-wrap .bangumi-order, .bangumi-order-wrap .bangumi-order-d,

View File

@ -382,6 +382,30 @@
@include color("f");
}
$rankColors: (
#61c05a: #44b0a0,
#5896de: #74b0f6,
#a068f1: #ba94f2,
// '#ff86b2': #ff86b2,
#ff9f3d: #f6be18,
#1a544b: #f6be18,
#414967: #f6be18,
#2d0855: #f6be18,
);
@each $current, $original in $rankColors {
$rgb: "rgb(" + red($current) + ", " + green($current) + ", " + blue($current) + ")";
.fans-medal-item[style*="border-color: #{$rgb}"],
.fans-medal-item[style*="border-color: #{$current}"] {
border-color: $original !important;
.label {
background-color: $original !important;
}
.level {
color: $original !important;
}
}
}
$highlight-map: (
1: #a0a7dc,
2: #c7aade,

View File

@ -13,6 +13,7 @@ const notSupported = [
'//member.bilibili.com/article-text/home',
'//www.bilibili.com/audio/submit/',
'//member.bilibili.com/studio/bs-editor/projects',
'//www.bilibili.com/s/video/',
]
const load = () => {
if (settings.noDarkOnMember && notSupported.some(it => {
@ -41,4 +42,13 @@ addSettingsListener('useDarkStyleAsUserStyle', () => {
export default {
reload: load,
unload: unload,
// widget: {
// content: /*html*/`<div class="gui-settings-flat-button" id="seo-jump"></div>`,
// condition: () => {
// return document.URL.startsWith('https://www.bilibili.com/s/video/')
// },
// success: () => {
// },
// },
}

View File

@ -106,6 +106,9 @@ export default {
// if (json.code === 0) {
// this.online = json.data.web_online
// }
if (!settings.simpleHomeWheelScroll) {
return
}
const contents = this.$refs.contents as HTMLElement
const { enableHorizontalScroll } = await import('../../../utils/horizontal-scroll')
enableHorizontalScroll(contents)

View File

@ -117,6 +117,9 @@ export default {
}
},
async mounted() {
if (!settings.simpleHomeWheelScroll) {
return
}
const contents = this.$refs.contents as HTMLElement
const { enableHorizontalScroll } = await import('../../../utils/horizontal-scroll')
enableHorizontalScroll(contents)

View File

@ -0,0 +1,123 @@
const commentAreaClass = 'bb-comment'
export interface CommentItem {
element: HTMLElement
id: string
userID: string
userName: string
content: string
timeText: string
likes: number
replies: Omit<CommentItem, 'replies'>[]
}
export type CommentItemCallback = (item: CommentItem) => void
export interface CommentArea {
element: HTMLElement
items: CommentItem[]
observer?: Observer
}
export const commentAreas: CommentArea[] = []
const itemAddedCallbacks: CommentItemCallback[] = []
const itemRemovedCallbacks: CommentItemCallback[] = []
export type CommentAreaCallback = (area: CommentArea) => void
const commentAreaCallbacks: CommentAreaCallback[] = []
const parseCommentItem = (element: HTMLElement) => {
const user = element.querySelector('.con .user .name') as HTMLElement
const item: CommentItem = {
id: element.getAttribute('data-id')!,
element,
userID: user.getAttribute('data-usercard-mid')!,
userName: user.textContent!,
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!),
}
})
}
return item
}
const observeItems = (area: CommentArea) => {
if (area.observer) {
return
}
area.items = dqa(area.element, '.list-item.reply-wrap').map(parseCommentItem)
area.items.forEach(item => {
itemAddedCallbacks.forEach(c => c(item))
})
area.observer = Observer.childListSubtree(area.element, records => {
records.forEach(r => {
const isCommentItem = (n: Node): n is HTMLElement => {
return n instanceof HTMLElement &&
n.classList.contains('list-item') &&
n.classList.contains('reply-wrap')
}
r.addedNodes.forEach(n => {
if (isCommentItem(n)) {
const commentItem = parseCommentItem(n)
area.items.push(commentItem)
itemAddedCallbacks.forEach(c => c(commentItem))
}
})
r.removedNodes.forEach(n => {
if (isCommentItem(n)) {
const id = n.getAttribute('data-id')!
const index = area.items.findIndex(item => item.id === id)
if (index !== -1) {
const [commentItem] = area.items.splice(index, 1)
itemRemovedCallbacks.forEach(c => c(commentItem))
}
}
})
})
})
}
const observeAreas = (node: Node) => {
if (node instanceof HTMLElement && node.classList.contains(commentAreaClass)) {
const area: CommentArea = {
element: node,
items: [],
}
commentAreas.push(area)
observeItems(area)
commentAreaCallbacks.forEach(c => c(area))
}
}
export const forEachCommentArea = (callback: CommentAreaCallback) => {
commentAreas.forEach(it => callback(it))
commentAreaCallbacks.push(callback)
}
export const forEachCommentItem = (callbacks: {
added: CommentItemCallback
removed: CommentItemCallback
}) => {
const { added, removed } = callbacks
commentAreas.forEach(area => {
area.items.forEach(item => added(item))
itemAddedCallbacks.push(added)
itemRemovedCallbacks.push(removed)
})
}
Observer.childListSubtree(document.body, records => {
records.forEach(r => {
r.addedNodes.forEach(n => observeAreas(n))
})
})
dqa('.' + commentAreaClass).forEach(observeAreas)
export default {
export: {
commentAreas,
forEachCommentArea,
forEachCommentItem,
}
}

View File

@ -5,7 +5,7 @@
transform: translateX(-36px);
}
.gui-settings-icon-panel {
&::after {
&::before {
content: "";
position: fixed;
left: 0;
@ -30,7 +30,7 @@
transform: translateX(36px);
}
.gui-settings-icon-panel {
&::after {
&::before {
right: 0;
left: unset;
}

View File

@ -57,6 +57,7 @@
<checkbox indent="0" key="keymap" dependencies=""></checkbox>
<checkbox indent="0" key="doubleClickFullscreen" dependencies=""></checkbox>
<checkbox indent="0" key="showCoverBeforePlay" dependencies=""></checkbox>
<checkbox indent="0" key="seoJump" dependencies=""></checkbox>
<category icon="style">样式</category>
<li class="indent-0 folded">
<label class="gui-settings-textbox-container">

View File

@ -40,7 +40,7 @@ body.remove-game-match-module #reportFirst3 {
position: relative;
margin-bottom: 4px;
}
.blocked-ads {
.blocked {
width: 440px;
height: 220px;
display: flex;
@ -51,17 +51,17 @@ body.remove-game-match-module #reportFirst3 {
align-items: center;
justify-content: space-evenly;
}
.blocked-ads.new {
.blocked.new {
/* width: 459px;
height: 202px; */
width: 100%;
height: 100%;
background-color: #eee;
}
body.dark .blocked-ads.new {
body.dark .blocked.new {
background-color: #333;
}
body.compact .blocked-ads {
body.compact .blocked {
width: 480px;
height: 240px;
}

View File

@ -14,7 +14,7 @@ if (document.URL.replace(window.location.search, '') === 'https://www.bilibili.c
li.style.display = 'flex'
const lia = li.querySelector('a:not(.more-text)')
lia.insertAdjacentHTML('afterend', /*html*/`
<div class="blocked-ads">${settings.showBlockedAdsTip ? '🚫已屏蔽广告' : ''}</div>
<div class="blocked">${settings.showBlockedAdsTip ? '🚫已屏蔽广告' : ''}</div>
`)
lia.style.visibility = 'hidden'
li.querySelector('a.more-text').style.display = 'none'
@ -32,7 +32,7 @@ if (document.URL.replace(window.location.search, '') === 'https://www.bilibili.c
.forEach(it => {
it.style.display = 'none'
it.insertAdjacentHTML('afterend', /*html*/`
<div class="blocked-ads new">${settings.showBlockedAdsTip ? '🚫已屏蔽广告' : ''}</div>
<div class="blocked new">${settings.showBlockedAdsTip ? '🚫已屏蔽广告' : ''}</div>
`)
// const index = [...it.parentElement.children].indexOf(it)
// it.remove()

View File

@ -163,10 +163,12 @@ class VideoEpisodeBatch extends Batch {
url: it.url
}
})
} else {
} else if (data.dash) {
const { getDashInfo, dashToFragments } = await import('./video-dash')
const info = await getDashInfo(url, typeof quality === 'string' ? parseInt(quality) : quality, true)
fragments = dashToFragments(info)
} else {
throw new Error(`获取链接失败: ${json.code} ${json.message}`)
}
result.push({
fragments,

View File

@ -23,6 +23,7 @@ export class DownloadVideoPackage {
if (data === null || data === undefined) {
return
}
console.log(`add file: ${escapeFilename(name)}`)
this.entries.push({ name: escapeFilename(name), data })
}
// private async preEmit() {

View File

@ -49,7 +49,10 @@ export const dashToFragments = (dashes: { videoDashes: VideoDash[], audioDashes:
export const getDashInfo = async (api: string, quality: number, allowLowerQuality = false) => {
const json = await Ajax.getJsonWithCredentials(api)
const data = json.data || json.result || json
if (json.code !== 0 || !data.dash) {
if (json.code !== 0) {
throw new Error(`API请求失败: ${json.code} ${json.message}`)
}
if (!data.dash) {
throw new Error('此视频没有DASH格式, 请改用FLV格式')
}
const qualities = data.accept_quality as number[]

View File

@ -2,9 +2,7 @@
if (!document.URL.startsWith('https://www.bilibili.com/video/') || !getUID()) {
return
}
await SpinQuery.condition(() => dq('.video-toolbar .ops .collect'), it => {
return it !== null && (it as HTMLElement).innerText !== '--'
})
await playerReady()
const favoriteButton = dq('.video-toolbar .ops .collect')
if (!favoriteButton) {
return

View File

@ -1,18 +1,6 @@
const target = document.URL.includes('bangumi') ? '#bofqi' : '.video-info .video-title .tit'
// SpinQuery.count('.nav-con,#bofqi', 3).then(() => {
// const element = document.querySelector(target)
// if (element === null) {
// return
// }
// element.scrollIntoView()
// if (settings.playerFocusOffset !== 0) {
// window.scrollBy(0, settings.playerFocusOffset)
// }
// })
SpinQuery.select(target).then(async element => {
await SpinQuery.condition(() => dq('.video-toolbar .ops .collect,.tool-bar .coin-info'), it => {
return it !== null && it.innerText !== '--'
})
await playerReady()
console.log(element)
if (element === null) {
return
@ -22,4 +10,4 @@ SpinQuery.select(target).then(async element => {
window.scrollBy(0, settings.playerFocusOffset)
}
console.log(element.offsetTop, settings.playerFocusOffset, window.scrollY)
})
})

View File

@ -2,9 +2,7 @@
if (!document.URL.startsWith('https://www.bilibili.com/video/') || !getUID()) {
return
}
await SpinQuery.condition(() => dq('.video-toolbar .ops .collect'), it => {
return it !== null && (it as HTMLElement).innerText !== '--'
})
await playerReady()
const favoriteButton = dq('.video-toolbar .ops .collect')
if (!favoriteButton) {
return
@ -121,7 +119,11 @@
throw new Error(`获取收藏状态失败: ${json.message}`)
}
const list: { id: number, title: string, fav_state: number }[] = _.get(json, 'data.list', [])
const quickList = list.find(it => it.id === settings.quickFavoriteID)!
const quickList = list.find(it => it.id === settings.quickFavoriteID)
if (quickList === undefined) {
settings.quickFavoriteID = 0
return
}
this.isFavorite = Boolean(quickList.fav_state)
this.selectedFavorite = this.favoriteTitle = quickList.title
} catch (error) {

3
src/video/seo-jump.ts Normal file
View File

@ -0,0 +1,3 @@
if (document.URL.startsWith('https://www.bilibili.com/s/video/')) {
window.location.assign(document.URL.replace('/s', ''))
}

View File

@ -1 +1 @@
1.10.31
1.10.33