Add details button on notify new version

This commit is contained in:
the1812 2018-11-11 19:43:26 +08:00
parent 6115a2fcfb
commit 334f60a006
4 changed files with 9 additions and 3 deletions

View File

@ -805,7 +805,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-watermark.min.js"] = (()=>{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 `)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-watermark.min.js"] = (()=>{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 `)}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.js"] = (()=>{return(e,l)=>{l.applyStyle("fullTweetsTitleStyle")}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.js"] = (()=>{return(e,l)=>{l.applyStyle("fullTweetsTitleStyle")}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/view-cover.min.js"] = (()=>{return(e,t)=>{class i{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);$(".image-viewer-container .close").on("click",()=>this.hide());t.applyStyle("imageViewerStyle")}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 i=URL.createObjectURL(e.response);this.imageData=i;this.viewer.find(".download").attr("href",i).attr("download",t);this.viewer.find(".image").prop("src",i)});e.send()}show(){this.viewer.addClass("opened")}hide(){this.viewer.removeClass("opened")}}if($("meta[itemprop='image'],meta[property='og:image']").length>0){return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前视频的封面"\n id="view-video-cover">\n 查看封面\n </button>\n </div>`,success:()=>{new SpinQuery(()=>$("meta[itemprop='image'],meta[property='og:image']"),e=>e.length>0&&e.prop("content"),e=>{const t=new i(e.prop("content"));$("#view-video-cover").on("click",()=>{t.show()}).parent().removeClass("hidden")}).start()}}}}else{return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前直播的封面"\n id="view-live-cover">\n 查看封面\n </button>\n </div>`,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 n=`https://api.live.bilibili.com/bili/getRoomInfo/${e}`;downloadText(n,e=>{const t=e.slice(1,-2);const n=JSON.parse(t).data.cover;const o=new i(n);$("#view-live-cover").on("click",()=>{o.show()}).parent().removeClass("hidden")})}})}}}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/view-cover.min.js"] = (()=>{return(e,t)=>{class i{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);$(".image-viewer-container .close").on("click",()=>this.hide());t.applyStyle("imageViewerStyle")}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 i=URL.createObjectURL(e.response);this.imageData=i;this.viewer.find(".download").attr("href",i).attr("download",t);this.viewer.find(".image").prop("src",i)});e.send()}show(){this.viewer.addClass("opened")}hide(){this.viewer.removeClass("opened")}}if($("meta[itemprop='image'],meta[property='og:image']").length>0){return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前视频的封面"\n id="view-video-cover">\n 查看封面\n </button>\n </div>`,success:()=>{new SpinQuery(()=>$("meta[itemprop='image'],meta[property='og:image']"),e=>e.length>0&&e.prop("content"),e=>{const t=new i(e.prop("content"));$("#view-video-cover").on("click",()=>{t.show()}).parent().removeClass("hidden")}).start()}}}}else{return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前直播的封面"\n id="view-live-cover">\n 查看封面\n </button>\n </div>`,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 n=`https://api.live.bilibili.com/bili/getRoomInfo/${e}`;downloadText(n,e=>{const t=e.slice(1,-2);const n=JSON.parse(t).data.cover;const o=new i(n);$("#view-live-cover").on("click",()=>{o.show()}).parent().removeClass("hidden")})}})}}}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/notify-new-version.min.js"] = (()=>{return(t,s)=>{const n={less:-1,equal:0,greater:1,incomparable:NaN};class e{constructor(t){this.parts=t.split(".").map(t=>parseInt(t));this.versionString=t}compareTo(t){for(let s=0;s<this.parts.length;++s){if(t.parts.length===s){return n.greater}if(this.parts[s]===t.parts[s]){continue}if(this.parts[s]>t.parts[s]){return n.greater}return n.less}if(this.parts.length!==t.parts.length){return n.less}return n.equal}greaterThan(t){return this.compareTo(t)===n.greater}lessThan(t){return this.compareTo(t)===n.less}equals(t){return this.compareTo(t)===n.equal}}const r=new e(s.data.latestVersion.text);const i=new e(t.currentVersion);if(r.greaterThan(i)){if(i.lessThan(new e("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),s=>{s.addClass("gui-settings-notification");const n=$(".gui-settings-footer");n.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,"检查更新")}}}}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/notify-new-version.min.js"] = (()=>{return(t,n)=>{const s={less:-1,equal:0,greater:1,incomparable:NaN};class e{constructor(t){this.parts=t.split(".").map(t=>parseInt(t));this.versionString=t}compareTo(t){for(let n=0;n<this.parts.length;++n){if(t.parts.length===n){return s.greater}if(this.parts[n]===t.parts[n]){continue}if(this.parts[n]>t.parts[n]){return s.greater}return s.less}if(this.parts.length!==t.parts.length){return s.less}return s.equal}greaterThan(t){return this.compareTo(t)===s.greater}lessThan(t){return this.compareTo(t)===s.less}equals(t){return this.compareTo(t)===s.equal}}const i=new e(n.data.latestVersion.text);const r=new e(t.currentVersion);if(i.greaterThan(r)){if(r.lessThan(new e("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),n=>{n.addClass("gui-settings-notification");const s=$(".gui-settings-footer");s.after(`\n <div class="gui-settings-footer">\n <span class="gui-settings-label">新版本${i.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 n=`新版本${i.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(n,"检查更新",1e4)}else{return{settingsWidget:{after:()=>$(".gui-settings-content"),content:`<div class="gui-settings-footer${t.blurSettingsPanel?" blur":""}">\n <span class="gui-settings-label">新版本${i.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 <a href="https://github.com/the1812/Bilibili-Evolved/releases">\n <button\n class="gui-settings-button">\n 详细信息\n </button>\n </a>\n </div>`,success:()=>{SpinQuery.any(()=>$(".gui-settings"),t=>{t.addClass("gui-settings-notification")});const n=`新版本${i.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(n,"检查更新")}}}}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/toast.min.js"] = (()=>{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 internalShow(t,s,i,a){const n=new e(t,s,a);n.duration=i;n.show()}static show(t,s,e){this.internalShow(t,s,e,"default")}static info(t,s,e){this.internalShow(t,s,e,"info")}static success(t,s,e){this.internalShow(t,s,e,"success")}static error(t,s,e){this.internalShow(t,s,e,"error")}}s.applyStyle("toastStyle");e.createToastContainer();return{export:e}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/toast.min.js"] = (()=>{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 internalShow(t,s,i,a){const n=new e(t,s,a);n.duration=i;n.show()}static show(t,s,e){this.internalShow(t,s,e,"default")}static info(t,s,e){this.internalShow(t,s,e,"info")}static success(t,s,e){this.internalShow(t,s,e,"success")}static error(t,s,e){this.internalShow(t,s,e,"error")}}s.applyStyle("toastStyle");e.createToastContainer();return{export:e}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-top-mask.min.js"] = (()=>{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 `)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-top-mask.min.js"] = (()=>{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 `)}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/blur-video-control.min.js"] = (()=>{return(r,o)=>{Observer.subtree("#bofqi",()=>{SpinQuery.count(()=>$(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom"),2,r=>{if(!r.hasClass("video-control-blur-container")){r.addClass("video-control-blur-container");r.prepend(`<div class="video-control-blur-layer"></div>`)}})});o.applyStyle("blurVideoControlStyle")}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/blur-video-control.min.js"] = (()=>{return(r,o)=>{Observer.subtree("#bofqi",()=>{SpinQuery.count(()=>$(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom"),2,r=>{if(!r.hasClass("video-control-blur-container")){r.addClass("video-control-blur-container");r.prepend(`<div class="video-control-blur-layer"></div>`)}})});o.applyStyle("blurVideoControlStyle")}})();

View File

@ -805,7 +805,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-watermark.min.js"] = (()=>{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 `)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-watermark.min.js"] = (()=>{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 `)}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.js"] = (()=>{return(e,l)=>{l.applyStyle("fullTweetsTitleStyle")}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.js"] = (()=>{return(e,l)=>{l.applyStyle("fullTweetsTitleStyle")}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/view-cover.min.js"] = (()=>{return(e,t)=>{class i{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);$(".image-viewer-container .close").on("click",()=>this.hide());t.applyStyle("imageViewerStyle")}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 i=URL.createObjectURL(e.response);this.imageData=i;this.viewer.find(".download").attr("href",i).attr("download",t);this.viewer.find(".image").prop("src",i)});e.send()}show(){this.viewer.addClass("opened")}hide(){this.viewer.removeClass("opened")}}if($("meta[itemprop='image'],meta[property='og:image']").length>0){return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前视频的封面"\n id="view-video-cover">\n 查看封面\n </button>\n </div>`,success:()=>{new SpinQuery(()=>$("meta[itemprop='image'],meta[property='og:image']"),e=>e.length>0&&e.prop("content"),e=>{const t=new i(e.prop("content"));$("#view-video-cover").on("click",()=>{t.show()}).parent().removeClass("hidden")}).start()}}}}else{return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前直播的封面"\n id="view-live-cover">\n 查看封面\n </button>\n </div>`,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 n=`https://api.live.bilibili.com/bili/getRoomInfo/${e}`;downloadText(n,e=>{const t=e.slice(1,-2);const n=JSON.parse(t).data.cover;const o=new i(n);$("#view-live-cover").on("click",()=>{o.show()}).parent().removeClass("hidden")})}})}}}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/view-cover.min.js"] = (()=>{return(e,t)=>{class i{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);$(".image-viewer-container .close").on("click",()=>this.hide());t.applyStyle("imageViewerStyle")}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 i=URL.createObjectURL(e.response);this.imageData=i;this.viewer.find(".download").attr("href",i).attr("download",t);this.viewer.find(".image").prop("src",i)});e.send()}show(){this.viewer.addClass("opened")}hide(){this.viewer.removeClass("opened")}}if($("meta[itemprop='image'],meta[property='og:image']").length>0){return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前视频的封面"\n id="view-video-cover">\n 查看封面\n </button>\n </div>`,success:()=>{new SpinQuery(()=>$("meta[itemprop='image'],meta[property='og:image']"),e=>e.length>0&&e.prop("content"),e=>{const t=new i(e.prop("content"));$("#view-video-cover").on("click",()=>{t.show()}).parent().removeClass("hidden")}).start()}}}}else{return{settingsWidget:{category:"视频与直播",content:`<div class="hidden">\n <button\n class="gui-settings-button"\n title="查看当前直播的封面"\n id="view-live-cover">\n 查看封面\n </button>\n </div>`,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 n=`https://api.live.bilibili.com/bili/getRoomInfo/${e}`;downloadText(n,e=>{const t=e.slice(1,-2);const n=JSON.parse(t).data.cover;const o=new i(n);$("#view-live-cover").on("click",()=>{o.show()}).parent().removeClass("hidden")})}})}}}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/notify-new-version.min.js"] = (()=>{return(t,s)=>{const n={less:-1,equal:0,greater:1,incomparable:NaN};class e{constructor(t){this.parts=t.split(".").map(t=>parseInt(t));this.versionString=t}compareTo(t){for(let s=0;s<this.parts.length;++s){if(t.parts.length===s){return n.greater}if(this.parts[s]===t.parts[s]){continue}if(this.parts[s]>t.parts[s]){return n.greater}return n.less}if(this.parts.length!==t.parts.length){return n.less}return n.equal}greaterThan(t){return this.compareTo(t)===n.greater}lessThan(t){return this.compareTo(t)===n.less}equals(t){return this.compareTo(t)===n.equal}}const r=new e(s.data.latestVersion.text);const i=new e(t.currentVersion);if(r.greaterThan(i)){if(i.lessThan(new e("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),s=>{s.addClass("gui-settings-notification");const n=$(".gui-settings-footer");n.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,"检查更新")}}}}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/notify-new-version.min.js"] = (()=>{return(t,n)=>{const s={less:-1,equal:0,greater:1,incomparable:NaN};class e{constructor(t){this.parts=t.split(".").map(t=>parseInt(t));this.versionString=t}compareTo(t){for(let n=0;n<this.parts.length;++n){if(t.parts.length===n){return s.greater}if(this.parts[n]===t.parts[n]){continue}if(this.parts[n]>t.parts[n]){return s.greater}return s.less}if(this.parts.length!==t.parts.length){return s.less}return s.equal}greaterThan(t){return this.compareTo(t)===s.greater}lessThan(t){return this.compareTo(t)===s.less}equals(t){return this.compareTo(t)===s.equal}}const i=new e(n.data.latestVersion.text);const r=new e(t.currentVersion);if(i.greaterThan(r)){if(r.lessThan(new e("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),n=>{n.addClass("gui-settings-notification");const s=$(".gui-settings-footer");s.after(`\n <div class="gui-settings-footer">\n <span class="gui-settings-label">新版本${i.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 n=`新版本${i.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(n,"检查更新",1e4)}else{return{settingsWidget:{after:()=>$(".gui-settings-content"),content:`<div class="gui-settings-footer${t.blurSettingsPanel?" blur":""}">\n <span class="gui-settings-label">新版本${i.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 <a href="https://github.com/the1812/Bilibili-Evolved/releases">\n <button\n class="gui-settings-button">\n 详细信息\n </button>\n </a>\n </div>`,success:()=>{SpinQuery.any(()=>$(".gui-settings"),t=>{t.addClass("gui-settings-notification")});const n=`新版本${i.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(n,"检查更新")}}}}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/toast.min.js"] = (()=>{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 internalShow(t,s,i,a){const n=new e(t,s,a);n.duration=i;n.show()}static show(t,s,e){this.internalShow(t,s,e,"default")}static info(t,s,e){this.internalShow(t,s,e,"info")}static success(t,s,e){this.internalShow(t,s,e,"success")}static error(t,s,e){this.internalShow(t,s,e,"error")}}s.applyStyle("toastStyle");e.createToastContainer();return{export:e}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/toast.min.js"] = (()=>{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 internalShow(t,s,i,a){const n=new e(t,s,a);n.duration=i;n.show()}static show(t,s,e){this.internalShow(t,s,e,"default")}static info(t,s,e){this.internalShow(t,s,e,"info")}static success(t,s,e){this.internalShow(t,s,e,"success")}static error(t,s,e){this.internalShow(t,s,e,"error")}}s.applyStyle("toastStyle");e.createToastContainer();return{export:e}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-top-mask.min.js"] = (()=>{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 `)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/remove-top-mask.min.js"] = (()=>{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 `)}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/blur-video-control.min.js"] = (()=>{return(r,o)=>{Observer.subtree("#bofqi",()=>{SpinQuery.count(()=>$(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom"),2,r=>{if(!r.hasClass("video-control-blur-container")){r.addClass("video-control-blur-container");r.prepend(`<div class="video-control-blur-layer"></div>`)}})});o.applyStyle("blurVideoControlStyle")}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/blur-video-control.min.js"] = (()=>{return(r,o)=>{Observer.subtree("#bofqi",()=>{SpinQuery.count(()=>$(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom"),2,r=>{if(!r.hasClass("video-control-blur-container")){r.addClass("video-control-blur-container");r.prepend(`<div class="video-control-blur-layer"></div>`)}})});o.applyStyle("blurVideoControlStyle")}})();

View File

@ -1 +1 @@
(()=>{return(t,s)=>{const n={less:-1,equal:0,greater:1,incomparable:NaN};class e{constructor(t){this.parts=t.split(".").map(t=>parseInt(t));this.versionString=t}compareTo(t){for(let s=0;s<this.parts.length;++s){if(t.parts.length===s){return n.greater}if(this.parts[s]===t.parts[s]){continue}if(this.parts[s]>t.parts[s]){return n.greater}return n.less}if(this.parts.length!==t.parts.length){return n.less}return n.equal}greaterThan(t){return this.compareTo(t)===n.greater}lessThan(t){return this.compareTo(t)===n.less}equals(t){return this.compareTo(t)===n.equal}}const r=new e(s.data.latestVersion.text);const i=new e(t.currentVersion);if(r.greaterThan(i)){if(i.lessThan(new e("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),s=>{s.addClass("gui-settings-notification");const n=$(".gui-settings-footer");n.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,"检查更新")}}}}}}})(); (()=>{return(t,n)=>{const s={less:-1,equal:0,greater:1,incomparable:NaN};class e{constructor(t){this.parts=t.split(".").map(t=>parseInt(t));this.versionString=t}compareTo(t){for(let n=0;n<this.parts.length;++n){if(t.parts.length===n){return s.greater}if(this.parts[n]===t.parts[n]){continue}if(this.parts[n]>t.parts[n]){return s.greater}return s.less}if(this.parts.length!==t.parts.length){return s.less}return s.equal}greaterThan(t){return this.compareTo(t)===s.greater}lessThan(t){return this.compareTo(t)===s.less}equals(t){return this.compareTo(t)===s.equal}}const i=new e(n.data.latestVersion.text);const r=new e(t.currentVersion);if(i.greaterThan(r)){if(r.lessThan(new e("1.4.2"))){SpinQuery.any(()=>$(".gui-settings"),n=>{n.addClass("gui-settings-notification");const s=$(".gui-settings-footer");s.after(`\n <div class="gui-settings-footer">\n <span class="gui-settings-label">新版本${i.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 n=`新版本${i.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(n,"检查更新",1e4)}else{return{settingsWidget:{after:()=>$(".gui-settings-content"),content:`<div class="gui-settings-footer${t.blurSettingsPanel?" blur":""}">\n <span class="gui-settings-label">新版本${i.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 <a href="https://github.com/the1812/Bilibili-Evolved/releases">\n <button\n class="gui-settings-button">\n 详细信息\n </button>\n </a>\n </div>`,success:()=>{SpinQuery.any(()=>$(".gui-settings"),t=>{t.addClass("gui-settings-notification")});const n=`新版本${i.versionString}已发布. <a class="link" href="${t.latestVersionLink}">更新</a>`;Toast.show(n,"检查更新")}}}}}}})();

View File

@ -94,6 +94,12 @@
更新 更新
</button> </button>
</a> </a>
<a href="https://github.com/the1812/Bilibili-Evolved/releases">
<button
class="gui-settings-button">
详细信息
</button>
</a>
</div>`, </div>`,
success: () => success: () =>
{ {