mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Merge branch 'preview' of https://github.com/the1812/Bilibili-Evolved into preview
This commit is contained in:
commit
e0e1b7eb85
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
@ -61,6 +61,10 @@ namespace BilibiliEvolved.Build.Watcher
|
|||||||
if (!Path.GetFileNameWithoutExtension(e.FullPath).EndsWith(".vue"))
|
if (!Path.GetFileNameWithoutExtension(e.FullPath).EndsWith(".vue"))
|
||||||
{
|
{
|
||||||
var originalFile = GetOriginalFilePath(e.FullPath);
|
var originalFile = GetOriginalFilePath(e.FullPath);
|
||||||
|
if (!File.Exists(originalFile))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
builder.WriteInfo($"[{Name}] {Path.GetFileName(originalFile)} changed.");
|
builder.WriteInfo($"[{Name}] {Path.GetFileName(originalFile)} changed.");
|
||||||
var content = File.ReadAllText(e.FullPath);
|
var content = File.ReadAllText(e.FullPath);
|
||||||
cache.AddCache(originalFile);
|
cache.AddCache(originalFile);
|
||||||
|
|||||||
Binary file not shown.
@ -28,9 +28,9 @@
|
|||||||
"compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738",
|
"compact-layout.min.js": "B20609A7CBBDB1845FA0156FB5BE6B1E1A1B8B069EA85F65D16241DD2C12D738",
|
||||||
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
|
"custom-control-background.min.css": "1981FD2BF3B17ECF33F98D5DEDAF0D32ACBE9532A51FDB70822286991AB98EF3",
|
||||||
"custom-control-background.min.js": "2A439B045A51D24F5115DD25995ED37E3D0371A074199FE6C727F2235F39C4D9",
|
"custom-control-background.min.js": "2A439B045A51D24F5115DD25995ED37E3D0371A074199FE6C727F2235F39C4D9",
|
||||||
"custom-navbar.min.css": "F89E4E3E8764EBF2AC43DC3E91AD0B7D8F4321C82015CC926EEC667F2F24B8AB",
|
"custom-navbar.min.css": "AD995F2905FBC1CE975A5B8B6FBA5387BD4294097FF6540B8C1A79A1C2D0FF39",
|
||||||
"custom-navbar.min.html": "8A5332791C9693A571F7B885D6367616F519054CACEDA2DDA147735638EDEE15",
|
"custom-navbar.min.html": "8A5332791C9693A571F7B885D6367616F519054CACEDA2DDA147735638EDEE15",
|
||||||
"custom-navbar.min.js": "C9B1D0796B79E6B25A7F55031A735CFDF1AD856D54129DDC22E4B60C84EB3902",
|
"custom-navbar.min.js": "B8AA154A6F02F684A0342A4E872D208012F875DB4BE7A2103D74788B4E9DF496",
|
||||||
"custom-navbar-settings.min.js": "BF251CA22EF6F8B681C70F9CC5C9DC3A31D6AAE3968CA3990722A0191B06AB13",
|
"custom-navbar-settings.min.js": "BF251CA22EF6F8B681C70F9CC5C9DC3A31D6AAE3968CA3990722A0191B06AB13",
|
||||||
"danmaku-converter.min.js": "FDAB4DB2E3C79730A39CDA7C5FD193693621FED206C6549E9B8F13778080CC12",
|
"danmaku-converter.min.js": "FDAB4DB2E3C79730A39CDA7C5FD193693621FED206C6549E9B8F13778080CC12",
|
||||||
"dark.min.css": "92935E38D76C19094AAFD3DAA5C936F1B74377AFE6A91BF88ADCA8FF64685C70",
|
"dark.min.css": "92935E38D76C19094AAFD3DAA5C936F1B74377AFE6A91BF88ADCA8FF64685C70",
|
||||||
@ -47,7 +47,7 @@
|
|||||||
"default-video-speed.min.js": "34E3D2BC8BD5BBC2534EDE6D7B02DE6D5F4A01879641A9E128B4C24124759D77",
|
"default-video-speed.min.js": "34E3D2BC8BD5BBC2534EDE6D7B02DE6D5F4A01879641A9E128B4C24124759D77",
|
||||||
"double-click-fullscreen.min.js": "09C035FC7E281ABB042A4200F69757AB093079DBCC9939BE8C53C23EE2EDE41C",
|
"double-click-fullscreen.min.js": "09C035FC7E281ABB042A4200F69757AB093079DBCC9939BE8C53C23EE2EDE41C",
|
||||||
"download-audio.min.js": "1F4536DE4FF302BFD026CA17E028AF8EB037FB6D0CB355692549DECAEAE0E8C9",
|
"download-audio.min.js": "1F4536DE4FF302BFD026CA17E028AF8EB037FB6D0CB355692549DECAEAE0E8C9",
|
||||||
"download-danmaku.min.js": "B254644525ABF064DB770FE986D2AB88063406783EC0538004EFBE0E2B2ACD62",
|
"download-danmaku.min.js": "E3B7DAC039E0E300EAE310AFD5C88476DA1A6228CBBDD99D290336C77EEA0AF8",
|
||||||
"download-video.min.css": "9E3DC9F6245E47D828E6098E9E9D8C93312FCC3E8915DD500512C9D6D9EB865E",
|
"download-video.min.css": "9E3DC9F6245E47D828E6098E9E9D8C93312FCC3E8915DD500512C9D6D9EB865E",
|
||||||
"download-video.min.html": "0DD24CECA30EFA2E6BEEC08523A39D98D80DE5F379EF16864012BDE1117A1ECB",
|
"download-video.min.html": "0DD24CECA30EFA2E6BEEC08523A39D98D80DE5F379EF16864012BDE1117A1ECB",
|
||||||
"download-video.min.js": "400F1182B7849852B4ECCA9065F4FD4652DE7827FBAB4A68B352C6B6B854316B",
|
"download-video.min.js": "400F1182B7849852B4ECCA9065F4FD4652DE7827FBAB4A68B352C6B6B854316B",
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84",
|
"favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84",
|
||||||
"feeds-apis.min.js": "A75F0C85EC2445C366225B552156DBCBC407197FF9A38378A21ECA7CE84FD42A",
|
"feeds-apis.min.js": "A75F0C85EC2445C366225B552156DBCBC407197FF9A38378A21ECA7CE84FD42A",
|
||||||
"feeds-filter.min.js": "10557E498B8BADA3C1C03E8C1DCD6FB24DBA2DA27A5A03BD861054F7E2989D46",
|
"feeds-filter.min.js": "10557E498B8BADA3C1C03E8C1DCD6FB24DBA2DA27A5A03BD861054F7E2989D46",
|
||||||
"feeds-filter-card.vue.min.js": "178C60A5F2EFC3CDEB49C4B6BD90E7E05AF205A863AC464E1E03FD3C2B4602D2",
|
"feeds-filter-card.vue.min.js": "86697BD2E1FAB99A7C3402192CFDDFF047BCF5826238EBDDFC318A54D3C6229D",
|
||||||
"ffmpeg-support.min.js": "B88C5BFDC1CC582CA25098D6BA47189FF628B7323EF9F90D4CFBC4E946648927",
|
"ffmpeg-support.min.js": "B88C5BFDC1CC582CA25098D6BA47189FF628B7323EF9F90D4CFBC4E946648927",
|
||||||
"fill-with-comments.min.js": "A32B6D4ADFA29C164F9675E07715EAC0A5CFE0BBB346735DD691BDA2D9F338C3",
|
"fill-with-comments.min.js": "A32B6D4ADFA29C164F9675E07715EAC0A5CFE0BBB346735DD691BDA2D9F338C3",
|
||||||
"filter-type-switch.vue.min.js": "E06B00EF48F3CCFACC82B858A266CE0DF48F8332C5900B3AD579330D4C6D3125",
|
"filter-type-switch.vue.min.js": "E06B00EF48F3CCFACC82B858A266CE0DF48F8332C5900B3AD579330D4C6D3125",
|
||||||
|
|||||||
BIN
min/bundle.zip
BIN
min/bundle.zip
Binary file not shown.
2
min/custom-navbar.min.css
vendored
2
min/custom-navbar.min.css
vendored
File diff suppressed because one or more lines are too long
2
min/custom-navbar.min.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/download-danmaku.min.js
vendored
2
min/download-danmaku.min.js
vendored
@ -1 +1 @@
|
|||||||
(()=>{return(t,e)=>{const{getFriendlyTitle:n}=e.import("title");const{DanmakuInfo:i}=e.import("video-info");const{DanmakuConverter:a}=e.import("danmaku-converter");async function o(t){const e=n();let i={title:e};try{await loadDanmakuSettingsPanel();const t=t=>{const e=parseFloat(dq(t).style.transform.replace(/translateX\(([\d\.]+)/,"$1"));const n={0:0,44:1,94:2,144:3,188:4}[e];return n};i.font=dq(".bilibili-player-video-danmaku-setting-right-font .bui-select-result").innerText;i.alpha=parseFloat(dq(".bilibili-player-setting-opacity .bui-bar").style.transform.replace(/scaleX\(([\d\.]+)\)/,"$1"));i.duration=(()=>{const e=[18,14,10,8,6][t(".bilibili-player-setting-speedplus .bui-thumb")];return t=>{switch(t.type){case 4:case 5:return 4;default:return e}}})();i.blockTypes=(()=>{let t=[];const e={".bilibili-player-block-filter-type[ftype=scroll]":[1,2,3],".bilibili-player-block-filter-type[ftype=top]":[5],".bilibili-player-block-filter-type[ftype=bottom]":[4],".bilibili-player-block-filter-type[ftype=color]":["color"]};for(const[n,i]of Object.entries(e)){if(dq(n).classList.contains("disabled")){t=t.concat(i)}}return t.concat(7,8)})();const e=[1.4,1.2,1,.8,.6][t(".bilibili-player-setting-fontsize .bui-thumb")];i.resolution={x:1920*e,y:1080*e};i.bottomMarginPercent=[.75,.5,.25,0,0][t(".bilibili-player-setting-area .bui-thumb")];if(i.bottomMarginPercent===0&&dq(".bilibili-player-video-danmaku-setting-left-preventshade input").checked){i.bottomMarginPercent=.15}i.bold=dq(".bilibili-player-video-danmaku-setting-right-font-bold input").checked}catch(t){i={font:"微软雅黑",alpha:.6,duration:t=>{switch(t.type){case 4:case 5:return 4;default:return 6}},blockTypes:[7,8],resolution:{x:1920,y:1080},bottomMarginPercent:.15,bold:false}}const o=new a(i);const l=o.convertToAssDocument(t);return l.generateAss()}async function l(t,e){const a=n();const l=new i((unsafeWindow||window).cid);await l.fetchInfo();const r=await(async()=>{if(t===true){return new Blob([await o(l.rawXML)],{type:"text/plain"})}else{return new Blob([l.rawXML],{type:"text/plain"})}})();const s=URL.createObjectURL(r);const c=dq("#danmaku-link");const d=c.getAttribute("href");if(d){URL.revokeObjectURL(d)}clearTimeout(e);dq("#download-danmaku>span").innerHTML="下载弹幕";c.setAttribute("download",`${a}.${t?"ass":"xml"}`);c.setAttribute("href",s);c.click()}return{export:{downloadDanmaku:l,convertToAss:o},widget:{content:`\n<button\n class="gui-settings-flat-button"\n id="download-danmaku">\n<i class="icon-danmaku"></i>\n<span>下载弹幕</span>\n<a id="danmaku-link" style="display:none"></a>\n</button>`,condition:async()=>{let t=await SpinQuery.select(()=>(unsafeWindow||window).cid);return Boolean(t)},success:()=>{const t=document.querySelector("#danmaku-link");dq("#download-danmaku").addEventListener("click",e=>{if(e.target!==t){const t=setTimeout(()=>dq("#download-danmaku>span").innerHTML="请稍侯...",200);l(e.shiftKey,t)}})}}}}})();
|
(()=>{return(t,e)=>{const{getFriendlyTitle:n}=e.import("title");const{DanmakuInfo:i}=e.import("video-info");const{DanmakuConverter:a}=e.import("danmaku-converter");async function o(t){const e=n();let i={title:e};try{await loadDanmakuSettingsPanel();const t=t=>{const e=parseFloat(dq(t).style.transform.replace(/translateX\(([\d\.]+)/,"$1"));return e*4/188};const e=t=>{const e=parseFloat(dq(t).style.transform.replace(/translateX\(([\d\.]+)/,"$1"));const n={0:0,44:1,94:2,144:3,188:4}[e];return n};i.font=dq(".bilibili-player-video-danmaku-setting-right-font .bui-select-result").innerText;i.alpha=parseFloat(dq(".bilibili-player-setting-opacity .bui-bar").style.transform.replace(/scaleX\(([\d\.]+)\)/,"$1"));i.duration=(()=>{const e=18-3*t(".bilibili-player-setting-speedplus .bui-thumb");return t=>{switch(t.type){case 4:case 5:return 4;default:return e}}})();i.blockTypes=(()=>{let t=[];const e={".bilibili-player-block-filter-type[ftype=scroll]":[1,2,3],".bilibili-player-block-filter-type[ftype=top]":[5],".bilibili-player-block-filter-type[ftype=bottom]":[4],".bilibili-player-block-filter-type[ftype=color]":["color"]};for(const[n,i]of Object.entries(e)){if(dq(n).classList.contains("disabled")){t=t.concat(i)}}return t.concat(7,8)})();const n=1.4-.2*t(".bilibili-player-setting-fontsize .bui-thumb");i.resolution={x:1920*n,y:1080*n};i.bottomMarginPercent=[.75,.5,.25,0,0][e(".bilibili-player-setting-area .bui-thumb")];if(i.bottomMarginPercent===0&&dq(".bilibili-player-video-danmaku-setting-left-preventshade input").checked){i.bottomMarginPercent=.15}i.bold=dq(".bilibili-player-video-danmaku-setting-right-font-bold input").checked}catch(t){i={font:"微软雅黑",alpha:.6,duration:t=>{switch(t.type){case 4:case 5:return 4;default:return 6}},blockTypes:[7,8],resolution:{x:1920,y:1080},bottomMarginPercent:.15,bold:false}}const o=new a(i);const r=o.convertToAssDocument(t);return r.generateAss()}async function r(t,e){const a=n();const r=new i((unsafeWindow||window).cid);await r.fetchInfo();const l=await(async()=>{if(t===true){return new Blob([await o(r.rawXML)],{type:"text/plain"})}else{return new Blob([r.rawXML],{type:"text/plain"})}})();const s=URL.createObjectURL(l);const c=dq("#danmaku-link");const d=c.getAttribute("href");if(d){URL.revokeObjectURL(d)}clearTimeout(e);dq("#download-danmaku>span").innerHTML="下载弹幕";c.setAttribute("download",`${a}.${t?"ass":"xml"}`);c.setAttribute("href",s);c.click()}return{export:{downloadDanmaku:r,convertToAss:o},widget:{content:`\n<button\n class="gui-settings-flat-button"\n id="download-danmaku">\n<i class="icon-danmaku"></i>\n<span>下载弹幕</span>\n<a id="danmaku-link" style="display:none"></a>\n</button>`,condition:async()=>{let t=await SpinQuery.select(()=>(unsafeWindow||window).cid);return Boolean(t)},success:()=>{const t=document.querySelector("#danmaku-link");dq("#download-danmaku").addEventListener("click",e=>{if(e.target!==t){const t=setTimeout(()=>dq("#download-danmaku>span").innerHTML="请稍侯...",200);r(e.shiftKey,t)}})}}}}})();
|
||||||
2
min/feeds-filter-card.vue.min.js
vendored
2
min/feeds-filter-card.vue.min.js
vendored
File diff suppressed because one or more lines are too long
@ -307,7 +307,6 @@ body.enable-feeds-filter:not(.disable-feeds-filter) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.disabled {
|
&.disabled {
|
||||||
border-color: var(--theme-color);
|
|
||||||
.be-icon {
|
.be-icon {
|
||||||
display: none;
|
display: none;
|
||||||
&.disabled {
|
&.disabled {
|
||||||
|
|||||||
@ -1427,7 +1427,7 @@ class WatchlaterList extends NavbarComponent {
|
|||||||
this.cards = []
|
this.cards = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.cards = rawList.map(item => {
|
const cards = rawList.map(item => {
|
||||||
const href = (() => {
|
const href = (() => {
|
||||||
if (item.pages === undefined) {
|
if (item.pages === undefined) {
|
||||||
return settings.watchLaterRedirect ?
|
return settings.watchLaterRedirect ?
|
||||||
@ -1455,6 +1455,13 @@ class WatchlaterList extends NavbarComponent {
|
|||||||
upID: item.owner.mid,
|
upID: item.owner.mid,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
// const noChange = cards.length === this.cards.length && cards.every((c, i) => this.cards[i].aid === c.aid)
|
||||||
|
// console.log(noChange)
|
||||||
|
// if (noChange) {
|
||||||
|
// console.log('skipped cards update')
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
this.cards = cards
|
||||||
},
|
},
|
||||||
async remove (aid, index) {
|
async remove (aid, index) {
|
||||||
this.cards.splice(index, 1)
|
this.cards.splice(index, 1)
|
||||||
|
|||||||
@ -199,7 +199,7 @@ li.nav-item[report-id="playpage_dynamic"] .i-frame,
|
|||||||
path {
|
path {
|
||||||
fill: var(--navbar-foreground);
|
fill: var(--navbar-foreground);
|
||||||
}
|
}
|
||||||
&.fill path {
|
&.fill:not(.transparent) path {
|
||||||
fill: var(--foreground-color-d);
|
fill: var(--foreground-color-d);
|
||||||
}
|
}
|
||||||
&.shadow:not(.transparent) {
|
&.shadow:not(.transparent) {
|
||||||
@ -237,7 +237,7 @@ li.nav-item[report-id="playpage_dynamic"] .i-frame,
|
|||||||
&.dark .popup iframe {
|
&.dark .popup iframe {
|
||||||
box-shadow: rgba(0, 0, 0, 0.2) 0 4px 8px 0px;
|
box-shadow: rgba(0, 0, 0, 0.2) 0 4px 8px 0px;
|
||||||
}
|
}
|
||||||
&.fill {
|
&.fill:not(.transparent) {
|
||||||
--navbar-background: var(--theme-color);
|
--navbar-background: var(--theme-color);
|
||||||
--navbar-foreground: var(--foreground-color-d);
|
--navbar-foreground: var(--foreground-color-d);
|
||||||
height: var(--navbar-height);
|
height: var(--navbar-height);
|
||||||
@ -356,7 +356,7 @@ li.nav-item[report-id="playpage_dynamic"] .i-frame,
|
|||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
&.fill form {
|
&.fill:not(.transparent) form {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
form:focus-within,
|
form:focus-within,
|
||||||
|
|||||||
@ -7,6 +7,10 @@ export async function convertToAss(xml: string) {
|
|||||||
let config: any = { title }
|
let config: any = { title }
|
||||||
try {
|
try {
|
||||||
await loadDanmakuSettingsPanel()
|
await loadDanmakuSettingsPanel()
|
||||||
|
const getSliderFactor = (selector: string) => {
|
||||||
|
const transform = parseFloat((dq(selector) as HTMLElement).style.transform!.replace(/translateX\(([\d\.]+)/, '$1'))
|
||||||
|
return transform * 4 / 188
|
||||||
|
}
|
||||||
const getSliderIndex = (selector: string) => {
|
const getSliderIndex = (selector: string) => {
|
||||||
const transform = parseFloat((dq(selector) as HTMLElement).style.transform!.replace(/translateX\(([\d\.]+)/, '$1')) as 0 | 44 | 94 | 144 | 188
|
const transform = parseFloat((dq(selector) as HTMLElement).style.transform!.replace(/translateX\(([\d\.]+)/, '$1')) as 0 | 44 | 94 | 144 | 188
|
||||||
const index = {
|
const index = {
|
||||||
@ -21,7 +25,7 @@ export async function convertToAss(xml: string) {
|
|||||||
config.font = (dq('.bilibili-player-video-danmaku-setting-right-font .bui-select-result') as HTMLElement).innerText
|
config.font = (dq('.bilibili-player-video-danmaku-setting-right-font .bui-select-result') as HTMLElement).innerText
|
||||||
config.alpha = parseFloat((dq('.bilibili-player-setting-opacity .bui-bar') as HTMLElement).style.transform!.replace(/scaleX\(([\d\.]+)\)/, '$1'))
|
config.alpha = parseFloat((dq('.bilibili-player-setting-opacity .bui-bar') as HTMLElement).style.transform!.replace(/scaleX\(([\d\.]+)\)/, '$1'))
|
||||||
config.duration = (() => {
|
config.duration = (() => {
|
||||||
const scrollDuration = [18, 14, 10, 8, 6][getSliderIndex('.bilibili-player-setting-speedplus .bui-thumb')]
|
const scrollDuration = 18 - 3 * getSliderFactor('.bilibili-player-setting-speedplus .bui-thumb')
|
||||||
return (danmaku: { type: number }) => {
|
return (danmaku: { type: number }) => {
|
||||||
switch (danmaku.type) {
|
switch (danmaku.type) {
|
||||||
case 4:
|
case 4:
|
||||||
@ -49,7 +53,7 @@ export async function convertToAss(xml: string) {
|
|||||||
}
|
}
|
||||||
return result.concat(7, 8)
|
return result.concat(7, 8)
|
||||||
})()
|
})()
|
||||||
const resolutionFactor = [1.4, 1.2, 1, 0.8, 0.6][getSliderIndex('.bilibili-player-setting-fontsize .bui-thumb')] // 改变分辨率来调整字体大小
|
const resolutionFactor = 1.4 - 0.2 * getSliderFactor('.bilibili-player-setting-fontsize .bui-thumb') // 改变分辨率来调整字体大小
|
||||||
config.resolution = {
|
config.resolution = {
|
||||||
x: 1920 * resolutionFactor,
|
x: 1920 * resolutionFactor,
|
||||||
y: 1080 * resolutionFactor
|
y: 1080 * resolutionFactor
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user