Remove scroll into view for wide screen

This commit is contained in:
the1812 2020-01-21 17:40:38 +08:00
parent 6436ac8d95
commit 72a1337403
8 changed files with 101 additions and 110 deletions

View File

@ -1177,7 +1177,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`;
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click();document.querySelector("#bofqi").scrollIntoView({behavior:"smooth"})}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let o=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));o=(()=>i(false))}}async function a(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const a=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(a&&$("#bilibiliPlayer[class*=mode-]").length===0){a.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",o,{once:true})}}Observer.videoChange(a)}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click()}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let a=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));a=(()=>i(false))}}async function o(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const o=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(o&&$("#bilibiliPlayer[class*=mode-]").length===0){o.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",a,{once:true})}}Observer.videoChange(o)}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})();

View File

@ -1177,7 +1177,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`;
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click();document.querySelector("#bofqi").scrollIntoView({behavior:"smooth"})}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let o=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));o=(()=>i(false))}}async function a(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const a=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(a&&$("#bilibiliPlayer[class*=mode-]").length===0){a.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",o,{once:true})}}Observer.videoChange(a)}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click()}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let a=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));a=(()=>i(false))}}async function o(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const o=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(o&&$("#bilibiliPlayer[class*=mode-]").length===0){o.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",a,{once:true})}}Observer.videoChange(o)}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})();

View File

@ -1176,7 +1176,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`;
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click();document.querySelector("#bofqi").scrollIntoView({behavior:"smooth"})}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let o=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));o=(()=>i(false))}}async function a(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const a=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(a&&$("#bilibiliPlayer[class*=mode-]").length===0){a.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",o,{once:true})}}Observer.videoChange(a)}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click()}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let a=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));a=(()=>i(false))}}async function o(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const o=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(o&&$("#bilibiliPlayer[class*=mode-]").length===0){o.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",a,{once:true})}}Observer.videoChange(o)}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})();

View File

@ -1176,7 +1176,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.css"] = `.bilibili-player-video-danmaku-setting-wrap{display:none!important}`;
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-danmaku-settings.min.js"] = (()=>{return(e,t)=>{async function i(e,t){const i=await SpinQuery.select(()=>document.querySelector(e));if(!i){return}i.checked=t;raiseEvent(i,"change")}Observer.videoChange(()=>{if(!e.enableDanmaku){i(".bilibili-player-video-danmaku-switch>input",false)}if(e.rememberDanmakuSettings){const i={subtitlesPreserve:".bilibili-player-video-danmaku-setting-left-preventshade input",smartMask:".bilibili-player-video-danmaku-setting-left-danmaku-mask input"};async function n(){const n=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-danmaku-setting"));if(!n){return}await loadLazyPanel(".bilibili-player-video-danmaku-setting");setTimeout(()=>t.removeStyle("defaultDanmakuSettingsStyle"),300);for(const[t,n]of Object.entries(e.danmakuSettings)){const e=await SpinQuery.select(()=>document.querySelector(i[t]));if(e!==null&&e.checked!==undefined&&e.checked!==n){e.click()}}}async function a(){for(const t in e.danmakuSettings){const n=await SpinQuery.select(()=>document.querySelector(i[t]));if(!n){return}n.addEventListener("click",()=>{e.danmakuSettings=Object.assign(e.danmakuSettings,{[t]:n.checked})})}}n();a()}})}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-layout.min.js"] = (()=>{return(e,o)=>{class t{setCookie(e,o){document.cookie=`${e}=${o};path=/;domain=.bilibili.com;max-age=31536000`}clearCookie(e){document.cookie=`${e}=;path=/;domain=.bilibili.com;max-age=0`}getValue(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),"$1")}checkSettings(){return e.useDefaultPlayerLayout}checkCookies(){}useNewLayout(){}useOldLayout(){}setLayout(e){if(e){this.useNewLayout()}else{this.useOldLayout()}}}class s extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<0&&e.defaultPlayerLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultPlayerLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustvideo";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,1)}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,-1)}}class u extends t{checkCookies(){super.checkCookies();const o=this.getValue(this.cookieKey);if(o===""||parseInt(o)<=0&&e.defaultBangumiLayout!=="旧版"){console.log(`default/old -> new`);this.useNewLayout()}else if(e.defaultBangumiLayout!=="新版"){console.log(`new -> old`);this.useOldLayout()}}constructor(){super();this.cookieKey="stardustpgcv";this.checkCookies()}useNewLayout(){super.useNewLayout();this.setCookie(this.cookieKey,"0606")}useOldLayout(){super.useOldLayout();this.setCookie(this.cookieKey,0)}}const i=new s;addSettingsListener("defaultPlayerLayout",e=>{i.setLayout(e==="新版")});const a=new u;addSettingsListener("defaultBangumiLayout",e=>{a.setLayout(e==="新版")})}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click();document.querySelector("#bofqi").scrollIntoView({behavior:"smooth"})}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let o=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));o=(()=>i(false))}}async function a(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const a=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(a&&$("#bilibiliPlayer[class*=mode-]").length===0){a.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",o,{once:true})}}Observer.videoChange(a)}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-player-mode.min.js"] = (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click()}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let a=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));a=(()=>i(false))}}async function o(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const o=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(o&&$("#bilibiliPlayer[class*=mode-]").length===0){o.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",a,{once:true})}}Observer.videoChange(o)}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-quality.min.js"] = (()=>{return(e,a)=>{const t=[{name:"1080P60",value:116},{name:"1080P+",value:112},{name:"1080P",value:80},{name:"720P60",value:74},{name:"720P",value:64},{name:"480P",value:32},{name:"360P",value:15},{name:"自动",value:0}];async function i(){const a=await SpinQuery.any(()=>$(".bilibili-player-video-quality-menu .bui-select-list>li.bui-select-item"));if(!a){return}const i=(e,a)=>a-e;const[n]=a.toArray().map(e=>parseInt(e.getAttribute("data-value"))).sort(i);const[l]=t.filter(a=>a.name===e.defaultVideoQuality).map(e=>e.value).sort(i);const[r]=t.map(e=>e.value).filter(e=>e<=Math.min(l,n)).sort(i);const u=await SpinQuery.select(()=>document.querySelector("video"));function s(){a.each((e,a)=>{if(parseInt(a.getAttribute("data-value"))===r){a.click()}});this.removeEventListener("play",s)}u.addEventListener("play",s)}if(Observer.videoChange){Observer.videoChange(i)}else{Observer.childList("#bofqi",()=>i())}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/default-video-speed.min.js"] = (()=>{return(e,a)=>{const i=a=>{const i=parseFloat(e.defaultVideoSpeed);a.playbackRate=i;SpinQuery.condition(()=>a,()=>a.playbackRate!==i,()=>a.playbackRate=i)};Observer.videoChange(()=>{const e=dq(".bilibili-player-video video");if(!e){return}i(e)})}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/double-click-fullscreen.min.js"] = (()=>{return(i,e)=>{(async()=>{const e=["https://www.bilibili.com/bangumi/","https://www.bilibili.com/video/"];if(!e.some(i=>document.URL.startsWith(i))){return}if(i.touchVideoPlayer&&i.touchVideoPlayerDoubleTapControl){Toast.info("在开启了<span>播放器触摸支持-启用双击控制</span>后, <span>双击全屏</span>功能将无效.","提示");i.doubleClickFullscreen=false;return}await SpinQuery.unsafeJquery();const l=await SpinQuery.condition(()=>dq(".bilibili-player-area"),i=>i!==null&&unsafeWindow.$(".bilibili-player-video").data("events"));if(l===null){return}const n="double-click-fullscreen";if(!l.classList.contains(n)){l.classList.add(n);const e=unsafeWindow.$(".bilibili-player-video");const t=i.doubleClickFullscreenPreventSingleClick?e.data("events").click[0].handler:()=>{};const c=new DoubleClickEvent(()=>dq(".bilibili-player-video-btn-fullscreen").click(),i=>t(i));if(i.doubleClickFullscreenPreventSingleClick){e.unbind("click")}c.bind(e[0])}})()}})();

View File

@ -58,7 +58,7 @@
"default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D", "default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D",
"default-danmaku-settings.min.js": "9DBC9AC9B5A3B59EBCC6F04D36527B523D66203AC5FE7C2AD5DB46FFB84F9382", "default-danmaku-settings.min.js": "9DBC9AC9B5A3B59EBCC6F04D36527B523D66203AC5FE7C2AD5DB46FFB84F9382",
"default-player-layout.min.js": "C6CE64216569A006566ADD7FC69451897612F46CC9641B8B15E0A13D5B1F2455", "default-player-layout.min.js": "C6CE64216569A006566ADD7FC69451897612F46CC9641B8B15E0A13D5B1F2455",
"default-player-mode.min.js": "6A699382CE6C036B1510DB53AD21D4E98472140E8470BD38BD94B4D249C57FF2", "default-player-mode.min.js": "244264CF975A8266ABB239C24E5CFEE0E3C918340267571244EE2CDC893D7167",
"default-video-quality.min.js": "D423D80B3151ACA49D8F769054E0F839DA2367E7F7C0590EFD60F71B4A6BEADB", "default-video-quality.min.js": "D423D80B3151ACA49D8F769054E0F839DA2367E7F7C0590EFD60F71B4A6BEADB",
"default-video-speed.min.js": "34E3D2BC8BD5BBC2534EDE6D7B02DE6D5F4A01879641A9E128B4C24124759D77", "default-video-speed.min.js": "34E3D2BC8BD5BBC2534EDE6D7B02DE6D5F4A01879641A9E128B4C24124759D77",
"double-click-fullscreen.min.js": "09C035FC7E281ABB042A4200F69757AB093079DBCC9939BE8C53C23EE2EDE41C", "double-click-fullscreen.min.js": "09C035FC7E281ABB042A4200F69757AB093079DBCC9939BE8C53C23EE2EDE41C",

Binary file not shown.

View File

@ -1 +1 @@
(()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click();document.querySelector("#bofqi").scrollIntoView({behavior:"smooth"})}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let o=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));o=(()=>i(false))}}async function a(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const a=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(a&&$("#bilibiliPlayer[class*=mode-]").length===0){a.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",o,{once:true})}}Observer.videoChange(a)}})(); (()=>{return(e,i)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}const n=[{name:"常规",action:()=>{}},{name:"宽屏",action:()=>{document.querySelector(".bilibili-player-video-btn-widescreen").click()}},{name:"网页全屏",action:()=>{document.querySelector(".bilibili-player-video-web-fullscreen").click()}},{name:"全屏",action:async()=>{const e=await SpinQuery.condition(()=>document.querySelector(".bilibili-player-video video"),e=>{return e!==null&&e.readyState===4&&document.readyState==="complete"&&document.hasFocus()});if(e===null){console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");return}document.querySelector(".bilibili-player-video-btn-fullscreen").click()}}];let t=()=>{};let a=()=>{};async function l(){if(e.autoLightOff){await SpinQuery.unsafeJquery();const e=await SpinQuery.any(()=>unsafeWindow.$(".bilibili-player-video-btn-setting"));if(!e){return}e.mouseover().mouseout();const i=async e=>{const i=await SpinQuery.select(()=>document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));i.checked=e;raiseEvent(i,"change")};t=(()=>i(true));a=(()=>i(false))}}async function o(){await l();await SpinQuery.condition(()=>$(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),e=>e.length===3&&$("video").length>0&&$("video").prop("duration"));const i=document.querySelector("video");if(!i){return}const o=n.find(i=>i.name===e.defaultPlayerMode);{const n=()=>{if(o&&$("#bilibiliPlayer[class*=mode-]").length===0){o.action()}};if(e.applyPlayerModeOnPlay&&!e.autoPlay){i.addEventListener("play",n,{once:true})}else{n()}if(!e.autoPlay){i.addEventListener("play",t,{once:true})}else{t()}i.addEventListener("ended",a,{once:true})}}Observer.videoChange(o)}})();

View File

@ -8,32 +8,27 @@ const playerModes = [
}, },
{ {
name: "宽屏", name: "宽屏",
action: () => action: () => {
{
document.querySelector(".bilibili-player-video-btn-widescreen").click(); document.querySelector(".bilibili-player-video-btn-widescreen").click();
document.querySelector("#bofqi").scrollIntoView({ behavior: "smooth" }); // document.querySelector("#bofqi").scrollIntoView({ behavior: "smooth" });
}, },
}, },
{ {
name: "网页全屏", name: "网页全屏",
action: () => action: () => {
{
document.querySelector(".bilibili-player-video-web-fullscreen").click(); document.querySelector(".bilibili-player-video-web-fullscreen").click();
}, },
}, },
{ {
name: "全屏", name: "全屏",
action: async () => action: async () => {
{
const video = await SpinQuery.condition( const video = await SpinQuery.condition(
() => document.querySelector(".bilibili-player-video video"), () => document.querySelector(".bilibili-player-video video"),
it => it => {
{
return it !== null && it.readyState === 4 return it !== null && it.readyState === 4
&& document.readyState === "complete" && document.hasFocus(); && document.readyState === "complete" && document.hasFocus();
}); });
if (video === null) if (video === null) {
{
console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时."); console.warn("[默认播放器模式] 未能应用全屏模式, 等待超时.");
return; return;
} }
@ -43,8 +38,7 @@ const playerModes = [
]; ];
let lightOff = () => { }; let lightOff = () => { };
let lightOn = () => { }; let lightOn = () => { };
async function initLights () async function initLights () {
{
if (settings.autoLightOff) { if (settings.autoLightOff) {
await SpinQuery.unsafeJquery(); await SpinQuery.unsafeJquery();
const settingsButton = await SpinQuery.any(() => unsafeWindow.$(".bilibili-player-video-btn-setting")); const settingsButton = await SpinQuery.any(() => unsafeWindow.$(".bilibili-player-video-btn-setting"));
@ -52,8 +46,7 @@ async function initLights ()
return; return;
} }
settingsButton.mouseover().mouseout(); settingsButton.mouseover().mouseout();
const setLight = async lightOff => const setLight = async lightOff => {
{
const checkbox = await SpinQuery.select( const checkbox = await SpinQuery.select(
() => document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input")); () => document.querySelector(".bilibili-player-video-btn-setting-panel-others-content-lightoff .bui-checkbox-input"));
checkbox.checked = lightOff; checkbox.checked = lightOff;
@ -63,8 +56,7 @@ async function initLights ()
lightOn = () => setLight(false); lightOn = () => setLight(false);
} }
} }
async function main () async function main () {
{
await initLights(); await initLights();
await SpinQuery.condition( await SpinQuery.condition(
() => $(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"), () => $(".bilibili-player-video,.bilibili-player-video-btn-start,.bilibili-player-area"),
@ -95,8 +87,7 @@ async function main ()
// } // }
// else // else
{ {
const onplay = () => const onplay = () => {
{
if (info && $("#bilibiliPlayer[class*=mode-]").length === 0) { if (info && $("#bilibiliPlayer[class*=mode-]").length === 0) {
info.action(); info.action();
} }