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
d9c9a55d9e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview)
|
||||
// @version 1.5.7
|
||||
// @version 1.5.8
|
||||
// @description 增强哔哩哔哩Web端体验. (预览版分支)
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @match *://*.bilibili.com/*
|
||||
@ -56,7 +56,7 @@
|
||||
notifyNewVersion: true,
|
||||
fixFullscreen: false,
|
||||
latestVersionLink: "https://github.com/the1812/Bilibili-Evolved/raw/preview/bilibili-evolved.preview.user.js",
|
||||
currentVersion: "1.5.7"
|
||||
currentVersion: "1.5.8"
|
||||
};
|
||||
function loadSettings()
|
||||
{
|
||||
@ -820,13 +820,6 @@
|
||||
{
|
||||
const attribute = func(settings, this) || {};
|
||||
this.attributes[key] = attribute;
|
||||
if (attribute.ajaxReload)
|
||||
{
|
||||
$(document).ajaxComplete(() =>
|
||||
{
|
||||
func(settings, this);
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved
|
||||
// @version 1.5.7
|
||||
// @version 1.5.8
|
||||
// @description 增强哔哩哔哩Web端体验.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @match *://*.bilibili.com/*
|
||||
@ -56,7 +56,7 @@
|
||||
notifyNewVersion: true,
|
||||
fixFullscreen: false,
|
||||
latestVersionLink: "https://github.com/the1812/Bilibili-Evolved/raw/master/bilibili-evolved.user.js",
|
||||
currentVersion: "1.5.7"
|
||||
currentVersion: "1.5.8"
|
||||
};
|
||||
function loadSettings()
|
||||
{
|
||||
@ -820,13 +820,6 @@
|
||||
{
|
||||
const attribute = func(settings, this) || {};
|
||||
this.attributes[key] = attribute;
|
||||
if (attribute.ajaxReload)
|
||||
{
|
||||
$(document).ajaxComplete(() =>
|
||||
{
|
||||
func(settings, this);
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
|
||||
0
min/clear-cache.min.js
vendored
Normal file
0
min/clear-cache.min.js
vendored
Normal file
2
min/dark-schedule.min.js
vendored
2
min/dark-schedule.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{class s{constructor(e){if(arguments.length===0){const e=new Date;this.hour=e.getHours();this.minute=e.getMinutes()}else if(arguments.length===1){[this.hour,this.minute]=e.split(":").slice(0,2).map(e=>this.validatePart(e));this.normalize()}else if(arguments.length===2){[this.hour,this.minute]=arguments}}validatePart(e){const t=parseInt(e);if(!isNaN(t)&&0<=t&&t<=59){return t}else{return null}}normalize(){while(this.minute<0){this.minute+=60;this.hour-=1}while(this.minute>=60){this.minute-=60;this.hour+=1}while(this.hour<0){this.hour+=24}while(this.hour>=24){this.hour-=24}}lessThan(e){if(this.hour<e.hour||this.hour===e.hour&&this.minute<e.minute){return true}return false}greaterThan(e){if(this.hour>e.hour||this.hour===e.hour&&this.minute>e.minute){return true}return false}equals(e){return this.hour===e.hour&&this.minute===e.minute}isInRange(e,t){if(e.equals(t)){return false}let s=this.greaterThan(e)&&this.lessThan(t);if(e.greaterThan(t)){s=this.greaterThan(e)||this.lessThan(t)}const i=s||this.equals(e);return i}static millisecondsBefore(e){const t=new s;const i=(new Date).getSeconds();const r=1e3*(t.hour*3600+t.minute*60+i);const n=1e3*(e.hour*3600+e.minute*60);let h=n-r;if(t.greaterThan(e)||t.equals(e)&&i!==0){h+=24*3600*1e3}return h}}function i(){if(e.darkSchedule){const r=new s(e.darkScheduleStart);const n=new s(e.darkScheduleEnd);const h=new s;const u=h.isInRange(r,n);if(e.useDarkStyle!==u){e.useDarkStyle=u;saveSettings(e);t.fetchByKey("useDarkStyle")}let a=0;if(u){a=s.millisecondsBefore(n)}else{a=s.millisecondsBefore(r)}if(a!==0){setTimeout(()=>i(),a)}}}i();return{ajaxReload:false,export:s}}})();
|
||||
(()=>{return(e,t)=>{class s{constructor(e){if(arguments.length===0){const e=new Date;this.hour=e.getHours();this.minute=e.getMinutes()}else if(arguments.length===1){[this.hour,this.minute]=e.split(":").slice(0,2).map(e=>this.validatePart(e));this.normalize()}else if(arguments.length===2){[this.hour,this.minute]=arguments}}validatePart(e){const t=parseInt(e);if(!isNaN(t)&&0<=t&&t<=59){return t}else{return null}}normalize(){while(this.minute<0){this.minute+=60;this.hour-=1}while(this.minute>=60){this.minute-=60;this.hour+=1}while(this.hour<0){this.hour+=24}while(this.hour>=24){this.hour-=24}}lessThan(e){if(this.hour<e.hour||this.hour===e.hour&&this.minute<e.minute){return true}return false}greaterThan(e){if(this.hour>e.hour||this.hour===e.hour&&this.minute>e.minute){return true}return false}equals(e){return this.hour===e.hour&&this.minute===e.minute}isInRange(e,t){if(e.equals(t)){return false}let s=this.greaterThan(e)&&this.lessThan(t);if(e.greaterThan(t)){s=this.greaterThan(e)||this.lessThan(t)}const i=s||this.equals(e);return i}static millisecondsBefore(e){const t=new s;const i=(new Date).getSeconds();const r=1e3*(t.hour*3600+t.minute*60+i);const n=1e3*(e.hour*3600+e.minute*60);let h=n-r;if(t.greaterThan(e)||t.equals(e)&&i!==0){h+=24*3600*1e3}return h}}function i(){if(e.darkSchedule){const r=new s(e.darkScheduleStart);const n=new s(e.darkScheduleEnd);const h=new s;const u=h.isInRange(r,n);if(e.useDarkStyle!==u){e.useDarkStyle=u;saveSettings(e);t.fetchByKey("useDarkStyle")}let o=0;if(u){o=s.millisecondsBefore(n)}else{o=s.millisecondsBefore(r)}if(o!==0){setTimeout(()=>i(),o)}}}i();return{export:s}}})();
|
||||
2
min/dark-styles.min.js
vendored
2
min/dark-styles.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(l,e)=>{if(l.useDarkStyle){e.applyStyle("scrollbarStyle");SpinQuery.any(()=>$(".custom-scrollbar"),l=>l.removeClass("custom-scrollbar"));if($("#banner_link").length===0||$("#banner_link").length>0&&l.overrideNavBar&&!l.showBanner){e.applyImportantStyle("darkStyleNavBar")}e.applyStyle("darkStyle");e.applyImportantStyle("darkStyleImportant")}else{$("#bilibili-scrollbar-style,#bilibili-new-style-dark-nav-bar,#bilibili-new-style-dark,#bilibili-new-style-dark-important").remove()}return{ajaxReload:false}}})();
|
||||
(()=>{return(l,e)=>{if(l.useDarkStyle){e.applyStyle("scrollbarStyle");SpinQuery.any(()=>$(".custom-scrollbar"),l=>l.removeClass("custom-scrollbar"));if($("#banner_link").length===0||$("#banner_link").length>0&&l.overrideNavBar&&!l.showBanner){e.applyImportantStyle("darkStyleNavBar")}e.applyStyle("darkStyle");e.applyImportantStyle("darkStyleImportant")}else{$("#bilibili-scrollbar-style,#bilibili-new-style-dark-nav-bar,#bilibili-new-style-dark,#bilibili-new-style-dark-important").remove()}}})();
|
||||
2
min/fix-fullscreen.min.js
vendored
2
min/fix-fullscreen.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return()=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const e=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){e.call(this)};return{ajaxReload:false}}})();
|
||||
(()=>{return()=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const e=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){e.call(this)}}})();
|
||||
2
min/force-wide.min.js
vendored
2
min/force-wide.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,a)=>{a.applyImportantStyle("forceWideStyle");return{ajaxReload:false}}})();
|
||||
(()=>{return(e,t)=>{t.applyImportantStyle("forceWideStyle")}})();
|
||||
2
min/full-tweets-title.min.js
vendored
2
min/full-tweets-title.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,l)=>{l.applyStyle("fullTweetsTitleStyle");return{ajaxReload:false}}})();
|
||||
(()=>{return(e,l)=>{l.applyStyle("fullTweetsTitleStyle")}})();
|
||||
2
min/gui-settings.min.js
vendored
2
min/gui-settings.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/haruna-scale.min.js
vendored
2
min/haruna-scale.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(n,a)=>{const t="bilibili-haruna-scale";if($(t).length===0){a.applyStyleFromText(`\n <style id='${t}'>\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n </style>\n `)}return{ajaxReload:false}}})();
|
||||
(()=>{return(n,t)=>{const a="bilibili-haruna-scale";if($(a).length===0){t.applyStyleFromText(`\n <style id='${a}'>\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n </style>\n `)}}})();
|
||||
2
min/hide-top-search.min.js
vendored
2
min/hide-top-search.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return()=>{const e=[".nav-search-keyword",".search-keyword"];for(const r of e){new SpinQuery(()=>$(r),e=>e.length>0&&e.attr("placeholder").length>0,e=>e.attr("placeholder","搜索")).start()}return{ajaxReload:false}}})();
|
||||
(()=>{return()=>{const e=[".nav-search-keyword",".search-keyword"];for(const r of e){new SpinQuery(()=>$(r),e=>e.length>0&&e.attr("placeholder").length>0,e=>e.attr("placeholder","搜索")).start()}}})();
|
||||
2
min/new-styles.min.js
vendored
2
min/new-styles.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{if(document.URL===`https://h.bilibili.com/`){return{ajaxReload:false}}t.applyStyle("scrollbarStyle");SpinQuery.any(()=>$(".custom-scrollbar"),e=>e.removeClass("custom-scrollbar"));const l={selectors:["div.nav-con.fl","#link-navbar-vm",".link-navbar",".nav-header-wrapper",".z_top .z_header"],get allSelectors(){return this.selectors.reduce((e,t)=>e+","+t)},get navbar(){let e=null;for(const t of this.selectors){e=e||document.querySelector(t)}return e},supports(e){if(e instanceof Element){const t=parseInt(window.getComputedStyle(e).height);const l=[60,50,0,56];return l.indexOf(t)!==-1}return false}};SpinQuery.any(()=>$(l.allSelectors),()=>{const e=l.navbar;if(l.supports(e)){t.applyStyle("style","bilibili-style-optimization")}else{t.applyStyle("oldStyle","bilibili-style-optimization")}});return{ajaxReload:false}}})();
|
||||
(()=>{return(e,t)=>{if(document.URL===`https://h.bilibili.com/`){return}t.applyStyle("scrollbarStyle");SpinQuery.any(()=>$(".custom-scrollbar"),e=>e.removeClass("custom-scrollbar"));const l={selectors:["div.nav-con.fl","#link-navbar-vm",".link-navbar",".nav-header-wrapper",".z_top .z_header"],get allSelectors(){return this.selectors.reduce((e,t)=>e+","+t)},get navbar(){let e=null;for(const t of this.selectors){e=e||document.querySelector(t)}return e},supports(e){if(e instanceof Element){const t=parseInt(window.getComputedStyle(e).height);const l=[60,50,0,56];return l.indexOf(t)!==-1}return false}};SpinQuery.any(()=>$(l.allSelectors),()=>{const e=l.navbar;if(l.supports(e)){t.applyStyle("style","bilibili-style-optimization")}else{t.applyStyle("oldStyle","bilibili-style-optimization")}})}})();
|
||||
2
min/notify-new-version.min.js
vendored
2
min/notify-new-version.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,s)=>{const e={less:-1,equal:0,greater:1,incomparable:NaN};class n{constructor(t){this.parts=t.split(".");this.versionString=t}isPositiveInteger(t){return/^\d+$/.test(t)}validateParts(){for(var t=0;t<this.parts.length;++t){if(!this.isPositiveInteger(this.parts[t])){return false}}return true}compareTo(t){if(!this.validateParts()||!t.validateParts()){return e.incomparable}for(let s=0;s<this.parts.length;++s){if(t.parts.length===s){return e.greater}if(this.parts[s]===t.parts[s]){continue}if(this.parts[s]>t.parts[s]){return e.greater}return e.less}if(this.parts.length!==t.parts.length){return e.less}return e.equal}greaterThan(t){return this.compareTo(t)===e.greater}lessThan(t){return this.compareTo(t)===e.less}equals(t){return this.compareTo(t)===e.equal}}const r=new n(s.data.latestVersion.text);const a=new n(t.currentVersion);if(r.greaterThan(a)){if(a.lessThan(new n("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),s=>{s.addClass("gui-settings-notification");const e=$(".gui-settings-footer");e.after(`\n <div class="gui-settings-footer">\n <span class="gui-settings-label">新版本${r.versionString}已发布.</span>\n <a>\n <button\n class="gui-settings-button"\n id="new-version-update">\n 更新\n </button>\n </a>\n </div>`);$("#new-version-update").parent().attr("href",t.latestVersionLink)});const s=`新版本${r.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(s,"检查更新",1e4)}else{return{ajaxReload:false,settingsWidget:{after:()=>$(".gui-settings-content"),content:`<div class="gui-settings-footer${t.blurSettingsPanel?" blur":""}">\n <span class="gui-settings-label">新版本${r.versionString}已发布.</span>\n <a href="${t.latestVersionLink}">\n <button\n class="gui-settings-button"\n id="new-version-update">\n 更新\n </button>\n </a>\n </div>`,success:()=>{SpinQuery.any(()=>$(".gui-settings"),t=>{t.addClass("gui-settings-notification")});const s=`新版本${r.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(s,"检查更新")}}}}}return{ajaxReload:false}}})();
|
||||
(()=>{return(t,s)=>{const e={less:-1,equal:0,greater:1,incomparable:NaN};class n{constructor(t){this.parts=t.split(".");this.versionString=t}isPositiveInteger(t){return/^\d+$/.test(t)}validateParts(){for(var t=0;t<this.parts.length;++t){if(!this.isPositiveInteger(this.parts[t])){return false}}return true}compareTo(t){if(!this.validateParts()||!t.validateParts()){return e.incomparable}for(let s=0;s<this.parts.length;++s){if(t.parts.length===s){return e.greater}if(this.parts[s]===t.parts[s]){continue}if(this.parts[s]>t.parts[s]){return e.greater}return e.less}if(this.parts.length!==t.parts.length){return e.less}return e.equal}greaterThan(t){return this.compareTo(t)===e.greater}lessThan(t){return this.compareTo(t)===e.less}equals(t){return this.compareTo(t)===e.equal}}const r=new n(s.data.latestVersion.text);const i=new n(t.currentVersion);if(r.greaterThan(i)){if(i.lessThan(new n("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),s=>{s.addClass("gui-settings-notification");const e=$(".gui-settings-footer");e.after(`\n <div class="gui-settings-footer">\n <span class="gui-settings-label">新版本${r.versionString}已发布.</span>\n <a>\n <button\n class="gui-settings-button"\n id="new-version-update">\n 更新\n </button>\n </a>\n </div>`);$("#new-version-update").parent().attr("href",t.latestVersionLink)});const s=`新版本${r.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(s,"检查更新",1e4)}else{return{settingsWidget:{after:()=>$(".gui-settings-content"),content:`<div class="gui-settings-footer${t.blurSettingsPanel?" blur":""}">\n <span class="gui-settings-label">新版本${r.versionString}已发布.</span>\n <a href="${t.latestVersionLink}">\n <button\n class="gui-settings-button"\n id="new-version-update">\n 更新\n </button>\n </a>\n </div>`,success:()=>{SpinQuery.any(()=>$(".gui-settings"),t=>{t.addClass("gui-settings-notification")});const s=`新版本${r.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(s,"检查更新")}}}}}}})();
|
||||
2
min/override-navbar.min.js
vendored
2
min/override-navbar.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,n)=>{new SpinQuery(()=>$(".head-content.bili-wrapper>div.search").not(".filter-item"),e=>e.length>0&&$(".nav-con.fr").length>0,e=>{e.detach().insertAfter(".nav-con.fr")}).start();n.applyStyle("navbarOverrideStyle");if(!e.showBanner){n.applyStyle("noBannerStyle")}return{ajaxReload:false}}})();
|
||||
(()=>{return(e,n)=>{new SpinQuery(()=>$(".head-content.bili-wrapper>div.search").not(".filter-item"),e=>e.length>0&&$(".nav-con.fr").length>0,e=>{e.detach().insertAfter(".nav-con.fr")}).start();n.applyStyle("navbarOverrideStyle");if(!e.showBanner){n.applyStyle("noBannerStyle")}}})();
|
||||
2
min/remove-promotions.min.js
vendored
2
min/remove-promotions.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,n)=>{n.applyStyle("removeAdsStyle");SpinQuery.any(()=>$(".gg-pic").parent("a"),e=>{e.css("display","none");e.each((e,n)=>{const i=$(n).index()+1;const a=$(n).parent().parent().find(`.pic li:nth-child(${i})`);$(a).css("visibility","hidden")})});return{ajaxReload:false}}})();
|
||||
(()=>{return(n,e)=>{e.applyStyle("removeAdsStyle");SpinQuery.any(()=>$(".gg-pic").parent("a"),n=>{n.css("display","none");n.each((n,e)=>{const i=$(e).index()+1;const t=$(e).parent().parent().find(`.pic li:nth-child(${i})`);$(t).css("visibility","hidden")})})}})();
|
||||
2
min/remove-top-mask.min.js
vendored
2
min/remove-top-mask.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(i,n)=>{const e="bilibili-video-top-mask";if($(`#${e}`).length===0){n.applyStyleFromText(`\n <style id='${e}'>\n .bilibili-player-video-top\n {\n display: none !important;\n }\n </style>\n `)}return{ajaxReload:false}}})();
|
||||
(()=>{return(i,n)=>{const l="bilibili-video-top-mask";if($(`#${l}`).length===0){n.applyStyleFromText(`\n <style id='${l}'>\n .bilibili-player-video-top\n {\n display: none !important;\n }\n </style>\n `)}}})();
|
||||
2
min/remove-watermark.min.js
vendored
2
min/remove-watermark.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(l,e)=>{const i="bilibili-live-watermark";if($(`#${i}`).length===0){e.applyStyleFromText(`\n <style id='${i}'>\n .bilibili-live-player-video-logo\n {\n display: none !important;\n }\n </style>\n `)}return{ajaxReload:false}}})();
|
||||
(()=>{return(i,l)=>{const n="bilibili-live-watermark";if($(`#${n}`).length===0){l.applyStyleFromText(`\n <style id='${n}'>\n .bilibili-live-player-video-logo\n {\n display: none !important;\n }\n </style>\n `)}}})();
|
||||
2
min/toast.min.js
vendored
2
min/toast.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(t,s)=>{class e{constructor(t="",s="",e="default"){this.type=e;this.message=t;this.title=s;this.duration=3e3;this.element=$(this.cardHtml)[0];this.$element=$(this.element);$(".toast-card-container").append(this.$element)}show(){this.element.classList.add("visible");this.$element.find(".toast-card-dismiss").on("click",()=>this.dismiss());if(this.duration){setTimeout(()=>this.dismiss(),this.duration)}}dismiss(){if(this.element.classList.contains("visible")){this.$element.on("transitionend",()=>this.$element.remove());this.element.classList.remove("visible")}}get cardHtml(){return`\n <div class="toast-card toast-${this.type}">\n <div class="toast-card-header">\n <h1 class="toast-card-title">${this.title}</h1>\n <svg class="toast-card-dismiss" viewbox="0 0 24 24">\n <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z">\n </path>\n </svg>\n </div>\n <p class="toast-card-message">${this.message}</p>\n </div>\n `}static get container(){return $(".toast-card-container")}static createToastContainer(){if($(".toast-card-container").length===0){$("body").append(`<div class="toast-card-container"></div>`)}}static _show(t,s,i,a){const n=new e(t,s,a);n.duration=i;n.show()}static show(t,s,e){this._show(t,s,e,"default")}static info(t,s,e){this._show(t,s,e,"info")}static success(t,s,e){this._show(t,s,e,"success")}static error(t,s,e){this._show(t,s,e,"error")}}s.applyStyle("toastStyle");e.createToastContainer();return{ajaxReload:false,export:e}}})();
|
||||
(()=>{return(t,s)=>{class i{constructor(t="",s="",i="default"){this.type=i;this.message=t;this.title=s;this.duration=3e3;this.element=$(this.cardHtml)[0];this.$element=$(this.element);$(".toast-card-container").append(this.$element)}show(){this.element.classList.add("visible");this.$element.find(".toast-card-dismiss").on("click",()=>this.dismiss());if(this.duration){setTimeout(()=>this.dismiss(),this.duration)}}dismiss(){if(this.element.classList.contains("visible")){this.$element.on("transitionend",()=>this.$element.remove());this.element.classList.remove("visible")}}get cardHtml(){return`\n <div class="toast-card toast-${this.type}">\n <div class="toast-card-header">\n <h1 class="toast-card-title">${this.title}</h1>\n <svg class="toast-card-dismiss" viewbox="0 0 24 24">\n <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z">\n </path>\n </svg>\n </div>\n <p class="toast-card-message">${this.message}</p>\n </div>\n `}static get container(){return $(".toast-card-container")}static createToastContainer(){if($(".toast-card-container").length===0){$("body").append(`<div class="toast-card-container"></div>`)}}static _show(t,s,e,a){const n=new i(t,s,a);n.duration=e;n.show()}static show(t,s,i){this._show(t,s,i,"default")}static info(t,s,i){this._show(t,s,i,"info")}static success(t,s,i){this._show(t,s,i,"success")}static error(t,s,i){this._show(t,s,i,"error")}}s.applyStyle("toastStyle");i.createToastContainer()}})();
|
||||
2
min/touch-navbar.min.js
vendored
2
min/touch-navbar.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return()=>{SpinQuery.count(()=>$("ul.fr>li.nav-item").not(".profile-info"),6,r=>{const e=(r,e)=>{const n=$(e);n.css("cursor","pointer");const t=n.find("a.t");t.removeAttr("href")};r.each(e)});return{ajaxReload:false}}})();
|
||||
(()=>{return()=>{SpinQuery.count(()=>$("ul.fr>li.nav-item").not(".profile-info"),6,n=>{const r=(n,r)=>{const t=$(r);t.css("cursor","pointer");const o=t.find("a.t");o.removeAttr("href")};n.each(r)})}})();
|
||||
2
min/touch-player.min.js
vendored
2
min/touch-player.min.js
vendored
File diff suppressed because one or more lines are too long
2
min/view-cover.min.js
vendored
2
min/view-cover.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,t)=>{class n{constructor(e){this.url=e;if($(".image-viewer").length===0){this.createDom()}this.viewer=$(".image-viewer-container");this.downloadImage()}createDom(){$("body").append(t.data.imageViewerDom.text);t.applyStyle("imageViewerStyle");$(".image-viewer-container .close").on("click",()=>this.hide())}downloadImage(){const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=document.title.replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","");const n=URL.createObjectURL(e.response);this.imageData=n;this.viewer.find(".download").attr("href",n).attr("download",t);this.viewer.find(".image").prop("src",n)});e.send()}show(){this.viewer.addClass("opened");$("html,body").addClass("image-viewer-opened")}hide(){this.viewer.removeClass("opened");$("html,body").removeClass("image-viewer-opened")}}if($("meta[itemprop='image']").length>0){return{ajaxReload:false,settingsWidget:{after:()=>$("span.settings-category").filter((e,t)=>t.innerHTML==="视频与直播").parent(),content:`<li class="indent-center hidden">\n <button\n class="gui-settings-button"\n title="查看当前视频的封面"\n id="view-video-cover">\n 查看封面\n </button>\n </li>`,success:()=>{new SpinQuery(()=>$("meta[itemprop='image']"),e=>e.length>0&&e.prop("content"),e=>{const t=new n(e.prop("content"));$("#view-video-cover").on("click",()=>{t.show()}).parent().removeClass("hidden")}).start()}}}}else{return{settingsWidget:{after:()=>$("span.settings-category").filter((e,t)=>t.innerHTML==="视频与直播").parent(),content:`<li class="indent-center hidden">\n <button\n class="gui-settings-button"\n title="查看当前直播的封面"\n id="view-live-cover">\n 查看封面\n </button>\n </li>`,success:()=>{SpinQuery.any(()=>$(".header-info-ctnr .room-cover"),e=>{const t=e.attr("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/bili/getRoomInfo/${e}`;downloadText(i,e=>{const t=e.slice(1,-2);const i=JSON.parse(t).data.cover;const o=new n(i);$("#view-live-cover").on("click",()=>{o.show()}).parent().removeClass("hidden")})}})}}}}}})();
|
||||
(()=>{return(e,t)=>{class n{constructor(e){this.url=e;if($(".image-viewer").length===0){this.createDom()}this.viewer=$(".image-viewer-container");this.downloadImage()}createDom(){$("body").append(t.data.imageViewerDom.text);t.applyStyle("imageViewerStyle");$(".image-viewer-container .close").on("click",()=>this.hide())}downloadImage(){const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=document.title.replace("_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili","");const n=URL.createObjectURL(e.response);this.imageData=n;this.viewer.find(".download").attr("href",n).attr("download",t);this.viewer.find(".image").prop("src",n)});e.send()}show(){this.viewer.addClass("opened");$("html,body").addClass("image-viewer-opened")}hide(){this.viewer.removeClass("opened");$("html,body").removeClass("image-viewer-opened")}}if($("meta[itemprop='image']").length>0){return{settingsWidget:{after:()=>$("span.settings-category").filter((e,t)=>t.innerHTML==="视频与直播").parent(),content:`<li class="indent-center hidden">\n <button\n class="gui-settings-button"\n title="查看当前视频的封面"\n id="view-video-cover">\n 查看封面\n </button>\n </li>`,success:()=>{new SpinQuery(()=>$("meta[itemprop='image']"),e=>e.length>0&&e.prop("content"),e=>{const t=new n(e.prop("content"));$("#view-video-cover").on("click",()=>{t.show()}).parent().removeClass("hidden")}).start()}}}}else{return{settingsWidget:{after:()=>$("span.settings-category").filter((e,t)=>t.innerHTML==="视频与直播").parent(),content:`<li class="indent-center hidden">\n <button\n class="gui-settings-button"\n title="查看当前直播的封面"\n id="view-live-cover">\n 查看封面\n </button>\n </li>`,success:()=>{SpinQuery.any(()=>$(".header-info-ctnr .room-cover"),e=>{const t=e.attr("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/bili/getRoomInfo/${e}`;downloadText(i,e=>{const t=e.slice(1,-2);const i=JSON.parse(t).data.cover;const o=new n(i);$("#view-live-cover").on("click",()=>{o.show()}).parent().removeClass("hidden")})}})}}}}}})();
|
||||
@ -141,7 +141,6 @@
|
||||
checkTime();
|
||||
|
||||
return {
|
||||
ajaxReload: false,
|
||||
export: ScheduleTime
|
||||
};
|
||||
};
|
||||
|
||||
@ -24,9 +24,5 @@
|
||||
$("#bilibili-scrollbar-style,#bilibili-new-style-dark-nav-bar,#bilibili-new-style-dark,#bilibili-new-style-dark-important")
|
||||
.remove();
|
||||
}
|
||||
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -3,8 +3,5 @@
|
||||
return (_, resources) =>
|
||||
{
|
||||
resources.applyImportantStyle("forceWideStyle");
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
@ -4,9 +4,7 @@
|
||||
{
|
||||
if (document.URL === `https://h.bilibili.com/`)
|
||||
{
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
return;
|
||||
}
|
||||
resources.applyStyle("scrollbarStyle");
|
||||
SpinQuery.any(
|
||||
@ -62,8 +60,5 @@
|
||||
resources.applyStyle("oldStyle", "bilibili-style-optimization");
|
||||
}
|
||||
});
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -17,8 +17,5 @@
|
||||
{
|
||||
resources.applyStyle("noBannerStyle");
|
||||
}
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
@ -672,8 +672,5 @@
|
||||
Observer.subtree("#bofqi", () => main());
|
||||
|
||||
resources.applyStyle("touchPlayerStyle");
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -17,8 +17,5 @@
|
||||
navItems.each(enableTouch);
|
||||
}
|
||||
);
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
0
utils/clear-cache.js
Normal file
0
utils/clear-cache.js
Normal file
@ -3,8 +3,5 @@
|
||||
return (_, resources) =>
|
||||
{
|
||||
resources.applyStyle("fullTweetsTitleStyle");
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -271,8 +271,5 @@
|
||||
}
|
||||
}
|
||||
).start();
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -14,8 +14,5 @@
|
||||
textBox => textBox.attr("placeholder", "搜索")
|
||||
).start();
|
||||
}
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -103,7 +103,6 @@
|
||||
else
|
||||
{
|
||||
return {
|
||||
ajaxReload: false,
|
||||
settingsWidget: {
|
||||
after: () => $(".gui-settings-content"),
|
||||
content: `<div class="gui-settings-footer${(settings.blurSettingsPanel ? " blur" : "")}">
|
||||
@ -129,9 +128,5 @@
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -16,8 +16,5 @@
|
||||
});
|
||||
}
|
||||
);
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -83,11 +83,5 @@
|
||||
|
||||
resources.applyStyle("toastStyle");
|
||||
Toast.createToastContainer();
|
||||
|
||||
|
||||
return {
|
||||
ajaxReload: false,
|
||||
export: Toast
|
||||
};
|
||||
};
|
||||
})();
|
||||
@ -1 +1 @@
|
||||
1.5.7
|
||||
1.5.8
|
||||
@ -8,8 +8,5 @@
|
||||
{
|
||||
originalRequsetFullscreen.call(this);
|
||||
};
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -15,8 +15,5 @@
|
||||
</style>
|
||||
`);
|
||||
}
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -14,8 +14,5 @@
|
||||
</style>
|
||||
`);
|
||||
}
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
@ -14,8 +14,5 @@
|
||||
</style>
|
||||
`);
|
||||
}
|
||||
return {
|
||||
ajaxReload: false
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
@ -53,7 +53,6 @@
|
||||
if ($("meta[itemprop='image']").length > 0)
|
||||
{
|
||||
return {
|
||||
ajaxReload: false,
|
||||
settingsWidget: {
|
||||
after: () => $("span.settings-category").filter((_, e) => e.innerHTML === "视频与直播").parent(),
|
||||
content: `<li class="indent-center hidden">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user