Update On Mon Mar 23 20:06:14 CET 2026

This commit is contained in:
github-action[bot]
2026-03-23 20:06:14 +01:00
parent e4ce3e16d9
commit b68247d4fe
639 changed files with 28453 additions and 6554 deletions
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/active-video-links"]=t():e["utils/active-video-links"]=t()}(globalThis,(()=>(()=>{var e,t,o={642:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=642,e.exports=t},401:e=>{"use strict";e.exports="这个组件会将视频简介中的普通网址转换为可点击的链接,并将<del>被 Bilibili 抛弃</del>已失效的 `acg.tv` 跳转链接修复为 `nicovideo.jp` 链接。\n\n例如: `https://acg.tv/sm37507315` → `https://www.nicovideo.jp/watch/sm37507315`\n\n<i>本组件不会保证目标链接的安全性,因此在点击前请自行验证其是否可信</i>\n"}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&n&&o;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,r.d(c,i),c},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";r.d(c,{component:()=>d});const e=coreApis.componentApis.define,t=coreApis.utils.log,o=coreApis.utils.urls,n=(0,t.useScopedConsole)("activeVideoLinks");let i=null;const l=/(?<!(\>|'|"|\/))(http:\/\/|https:\/\/|www\.)[^(\s,;())]+/g,s=()=>{try{document.querySelectorAll('a[href*="acg.tv"][href*="sm"]').forEach((e=>{const t=e.getAttribute("href");if(t){const o=t.replace("acg.tv","nicovideo.jp/watch");e.setAttribute("href",o),n.log(`Niconico Fix: ${t}${o}`)}})),(()=>{const e=document.querySelector(".desc-info-text");if(!e)return;const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>e.parentElement?.closest("a")?NodeFilter.FILTER_REJECT:l.test(e.textContent||"")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),o=[];let n=t.nextNode();for(;null!==n;)o.push(n),n=t.nextNode();o.forEach((e=>{const t=document.createDocumentFragment(),o=e.textContent||"";let n,r=0;for(l.lastIndex=0,n=l.exec(o);null!==n;){const e=n.index;r<e&&t.appendChild(document.createTextNode(o.slice(r,e)));const c=n[0],i=c.replace(/^https?:\/\//,"//").replace(/^www\./,"//"),s=document.createElement("a");s.href=i,s.target="_blank",s.textContent=c,t.appendChild(s),r=e+c.length,n=l.exec(o)}r<o.length&&t.appendChild(document.createTextNode(o.slice(r))),e.parentNode?.replaceChild(t,e)}))})(),(()=>{const e=document.querySelector(".desc-info-text");if(!e)return;const t=Array.from(e.querySelectorAll("a"));for(let e=0;e<t.length-1;e++){const o=t[e],r=t[e+1],c=o.getAttribute("href")||"",i=r.textContent?.trim()||"",l=r.getAttribute("href")||"";if(/^(https?:)?\/\/(www\.)?nicovideo\.jp\/watch\/?$/.test(c)&&/^sm\d+$/.test(i)&&l.includes(`/watch/${i}`)){const t=l.replace(/^(https?:)?/,"//"),c=document.createElement("a");c.href=t,c.target="_blank",c.textContent=i,o.replaceWith(c),r.remove(),n.log(`Merged Nico link: ${i}`),e++}}})()}catch(e){n.error("处理链接时遇到 Error:",e)}},a=()=>{n.log("视频链接增强已启用"),s(),i&&i.disconnect(),i=new MutationObserver(s),i.observe(document.documentElement,{childList:!0,subtree:!0}),n.log("已设置 Observer")},d=(0,e.defineComponentMetadata)({name:"activeVideoLinks",displayName:"视频链接增强",tags:[componentsTags.utils],entry:a,reload:a,unload:()=>{i&&(i.disconnect(),i=null)},urlInclude:o.videoUrls,author:{name:"Alan Ye",link:"https://github.com/at-wr"},commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const e=r(642);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(r.t.bind(r,401,17)).then((e=>e.default))}})()})})(),c=c.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/active-video-links"]=t():e["utils/active-video-links"]=t()}(globalThis,(()=>(()=>{var e,t,o={642:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=642,e.exports=t},401:e=>{"use strict";e.exports="这个组件会将视频简介中的普通网址转换为可点击的链接,并将<del>被 Bilibili 抛弃</del>已失效的 `acg.tv` 跳转链接修复为 `nicovideo.jp` 链接。\n\n例如: `https://acg.tv/sm37507315` → `https://www.nicovideo.jp/watch/sm37507315`\n\n<i>本组件不会保证目标链接的安全性,因此在点击前请自行验证其是否可信</i>\n"}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&n&&o;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,r.d(c,i),c},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";r.d(c,{component:()=>d});const e=coreApis.componentApis.define,t=coreApis.utils.log,o=coreApis.utils.urls,n=(0,t.useScopedConsole)("activeVideoLinks");let i=null;const l=/(?<!(\>|'|"|\/))(http:\/\/|https:\/\/|www\.)[^(\s,;())]+/g,s=()=>{try{document.querySelectorAll('a[href*="acg.tv"][href*="sm"]').forEach((e=>{const t=e.getAttribute("href");if(t){const o=t.replace("acg.tv","nicovideo.jp/watch");e.setAttribute("href",o),n.log(`Niconico Fix: ${t}${o}`)}})),(()=>{const e=document.querySelector(".desc-info-text");if(!e)return;const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>e.parentElement?.closest("a")?NodeFilter.FILTER_REJECT:l.test(e.textContent||"")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),o=[];let n=t.nextNode();for(;null!==n;)o.push(n),n=t.nextNode();o.forEach((e=>{const t=document.createDocumentFragment(),o=e.textContent||"";let n,r=0;for(l.lastIndex=0,n=l.exec(o);null!==n;){const e=n.index;r<e&&t.appendChild(document.createTextNode(o.slice(r,e)));const c=n[0],i=c.replace(/^https?:\/\//,"//").replace(/^www\./,"//"),s=document.createElement("a");s.href=i,s.target="_blank",s.textContent=c,t.appendChild(s),r=e+c.length,n=l.exec(o)}r<o.length&&t.appendChild(document.createTextNode(o.slice(r))),e.parentNode?.replaceChild(t,e)}))})(),(()=>{const e=document.querySelector(".desc-info-text");if(!e)return;const t=Array.from(e.querySelectorAll("a"));for(let e=0;e<t.length-1;e++){const o=t[e],r=t[e+1],c=o.getAttribute("href")||"",i=r.textContent?.trim()||"",l=r.getAttribute("href")||"";if(/^(https?:)?\/\/(www\.)?nicovideo\.jp\/watch\/?$/.test(c)&&/^sm\d+$/.test(i)&&l.includes(`/watch/${i}`)){const t=l.replace(/^(https?:)?/,"//"),c=document.createElement("a");c.href=t,c.target="_blank",c.textContent=i,o.replaceWith(c),r.remove(),n.log(`Merged Nico link: ${i}`),e++}}})()}catch(e){n.error("处理链接时遇到 Error:",e)}},a=()=>{n.log("视频链接增强已启用"),s(),i&&i.disconnect(),i=new MutationObserver(s),i.observe(document.documentElement,{childList:!0,subtree:!0}),n.log("已设置 Observer")},d=(0,e.defineComponentMetadata)({name:"activeVideoLinks",displayName:"视频链接增强",tags:[componentsTags.utils],entry:a,reload:a,unload:()=>{i&&(i.disconnect(),i=null)},urlInclude:o.videoUrls,author:{name:"Alan Ye",link:"https://github.com/at-wr"},commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const e=r(642);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(r.t.bind(r,401,17)).then((e=>e.default))}})()})})(),c=c.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/active-video-links.js.map
File diff suppressed because one or more lines are too long
@@ -1,11 +1,14 @@
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["utils/album-time-show"]=e():t["utils/album-time-show"]=e()}(globalThis,(()=>(()=>{var t,e,o={73:(t,e,o)=>{var n=o(955)((function(t){return t[1]}));n.push([t.id,'@charset "UTF-8";\n/* 保持相簿元素高度 */\n.album-card {\n margin-bottom: 21px;\n}\n\n/* 上移原互动数据 */\n.album-card .album-card__info {\n margin-top: -5px;\n}\n\n/* 相簿发布时间样式 */\n.album-pub-time {\n color: #99a2aa;\n position: absolute;\n margin-top: -5px;\n}\nbody.dark .album-pub-time {\n color: #aaa;\n}',""]),t.exports=n},955:t=>{"use strict";
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["utils/album-time-show"]=e():t["utils/album-time-show"]=e()}(globalThis,(()=>(()=>{var t,e,n={73:(t,e,n)=>{var r=n(904),o=n(955)(r);o.push([t.id,'@charset "UTF-8";\n/* 保持相簿元素高度 */\n.album-card {\n margin-bottom: 21px;\n}\n\n/* 上移原互动数据 */\n.album-card .album-card__info {\n margin-top: -5px;\n}\n\n/* 相簿发布时间样式 */\n.album-pub-time {\n color: #99a2aa;\n position: absolute;\n margin-top: -5px;\n}\nbody.dark .album-pub-time {\n color: #aaa;\n}',"",{version:3,sources:["webpack://./registry/lib/components/utils/album-time-show/album-time.scss"],names:[],mappings:"AAAA,gBAAgB;AAChB,aAAa;AACb;EACE,mBAAmB;AACrB;;AAEA,YAAY;AACZ;EACE,gBAAgB;AAClB;;AAEA,aAAa;AACb;EACE,cAAc;EACd,kBAAkB;EAClB,gBAAgB;AAClB;AACA;EACE,WAAW;AACb",sourcesContent:['@charset "UTF-8";\n/* 保持相簿元素高度 */\n.album-card {\n margin-bottom: 21px;\n}\n\n/* 上移原互动数据 */\n.album-card .album-card__info {\n margin-top: -5px;\n}\n\n/* 相簿发布时间样式 */\n.album-pub-time {\n color: #99a2aa;\n position: absolute;\n margin-top: -5px;\n}\nbody.dark .album-pub-time {\n color: #aaa;\n}'],sourceRoot:""}]),t.exports=o},955:t=>{"use strict";
// eslint-disable-next-line func-names
t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o=t(e);return e[2]?"@media ".concat(e[2]," {").concat(o,"}"):o})).join("")},
t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},
// eslint-disable-next-line func-names
e.i=function(t,o,n){"string"==typeof t&&(
e.i=function(t,n,r){"string"==typeof t&&(
// eslint-disable-next-line no-param-reassign
t=[[null,t,""]]);var r={};if(n)for(var a=0;a<this.length;a++){
t=[[null,t,""]]);var o={};if(r)for(var a=0;a<this.length;a++){
// eslint-disable-next-line prefer-destructuring
var i=this[a][0];null!=i&&(r[i]=!0)}for(var c=0;c<t.length;c++){var s=[].concat(t[c]);n&&r[s[0]]||(o&&(s[2]?s[2]="".concat(o," and ").concat(s[2]):s[2]=o),e.push(s))}},e}},319:(t,e,o)=>{var n=o(73);n&&n.__esModule&&(n=n.default),t.exports="string"==typeof n?n:n.toString()},479:t=>{"use strict";t.exports=coreApis.style}},n={};function r(t){var e=n[t];if(void 0!==e)return e.exports;var a=n[t]={id:t,exports:{}};return o[t](a,a.exports,r),a.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var a=Object.create(null);r.r(a);var i={};t=t||[null,e({}),e([]),e(e)];for(var c=2&n&&o;"object"==typeof c&&!~t.indexOf(c);c=e(c))Object.getOwnPropertyNames(c).forEach((t=>i[t]=()=>o[t]));return i.default=()=>o,r.d(a,i),a},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{"use strict";r.d(a,{component:()=>c});const t=coreApis.componentApis.define,e=coreApis.observer,o=coreApis.spinQuery;let n,i;const c=(0,t.defineComponentMetadata)({name:"albumPubTimeShow",author:{name:"Light_Quanta",link:"https://github.com/LightQuanta"},displayName:"相簿发布时间显示",tags:[componentsTags.utils],urlInclude:[/^https:\/\/space\.bilibili\.com/],entry:async()=>{const t=await(0,o.select)(".s-space");(0,e.childList)(t,(async()=>{document.URL.match(/^https:\/\/space\.bilibili\.com\/\d+\/album/)&&(n=await(0,o.select)(".album-list__content"),(async t=>{const[o]=(0,e.attributesSubtree)(t,(()=>{n.querySelectorAll(".album-card").forEach((t=>{const e=t.querySelector(".album-pub-time"),o=t.__vue__.item.ctime;
var i=this[a][0];null!=i&&(o[i]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),e.push(u))}},e}},904:t=>{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}t.exports=function(t){var n=e(t,4),r=n[1],o=n[3];if(!o)return r;if("function"==typeof btoa){
// eslint-disable-next-line no-undef
var a=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),c="/*# ".concat(i," */"),u=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[r].concat(u).concat([c]).join("\n")}return[r].join("\n")}},319:(t,e,n)=>{var r=n(73);r&&r.__esModule&&(r=r.default),t.exports="string"==typeof r?r:r.toString()},479:t=>{"use strict";t.exports=coreApis.style}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var a=r[t]={id:t,exports:{}};return n[t](a,a.exports,o),a.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};t=t||[null,e({}),e([]),e(e)];for(var c=2&r&&n;"object"==typeof c&&!~t.indexOf(c);c=e(c))Object.getOwnPropertyNames(c).forEach((t=>i[t]=()=>n[t]));return i.default=()=>n,o.d(a,i),a},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{"use strict";o.d(a,{component:()=>c});const t=coreApis.componentApis.define,e=coreApis.observer,n=coreApis.spinQuery;let r,i;const c=(0,t.defineComponentMetadata)({name:"albumPubTimeShow",author:{name:"Light_Quanta",link:"https://github.com/LightQuanta"},displayName:"相簿发布时间显示",tags:[componentsTags.utils],urlInclude:[/^https:\/\/space\.bilibili\.com/],entry:async()=>{const t=await(0,n.select)(".s-space");(0,e.childList)(t,(async()=>{document.URL.match(/^https:\/\/space\.bilibili\.com\/\d+\/album/)&&(r=await(0,n.select)(".album-list__content"),(async t=>{const[n]=(0,e.attributesSubtree)(t,(()=>{r.querySelectorAll(".album-card").forEach((t=>{const e=t.querySelector(".album-pub-time"),n=t.__vue__.item.ctime;
// eslint-disable-next-line no-underscore-dangle
void 0!==o&&(null!==e?e.innerHTML=new Date(1e3*o).toLocaleString():t.insertAdjacentHTML("beforeend",`<div class="album-pub-time">${new Date(1e3*o).toLocaleString()}</div>`))}))}));i?.disconnect(),i=o;const{addImportantStyle:a}=await Promise.resolve().then(r.t.bind(r,479,23)),{default:c}=await Promise.resolve().then(r.t.bind(r,319,23));a(c,"album-pub-time-style")})(n))}))},description:{"zh-CN":"在相簿界面显示相簿的发布时间"},commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7"})})(),a=a.component})()));
void 0!==n&&(null!==e?e.innerHTML=new Date(1e3*n).toLocaleString():t.insertAdjacentHTML("beforeend",`<div class="album-pub-time">${new Date(1e3*n).toLocaleString()}</div>`))}))}));i?.disconnect(),i=n;const{addImportantStyle:a}=await Promise.resolve().then(o.t.bind(o,479,23)),{default:c}=await Promise.resolve().then(o.t.bind(o,319,23));a(c,"album-pub-time-style")})(r))}))},description:{"zh-CN":"在相簿界面显示相簿的发布时间"},commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7"})})(),a=a.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/album-time-show.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/change-update-urls"]=t():e["utils/change-update-urls"]=t()}(globalThis,(()=>(()=>{"use strict";var e={101:(e,t,o)=>{o.r(t),o.d(t,{default:()=>c});var n=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("DefaultWidget",{attrs:{name:"替换更新链接",icon:"mdi-file-replace-outline",disabled:e.busy},on:{click:function(t){return e.replaceBranch()}}})};n._withStripped=!0;const r=coreApis.settings,i=coreApis.toast,s=coreApis.utils.log,a=coreApis.ui;var l=function(e,t,o,n,r,i,s,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=o,c._compiled=!0),n&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}(Vue.extend({components:{DefaultWidget:a.DefaultWidget},data:()=>({busy:!1}),methods:{async replaceBranch(){const e=window.prompt("输入希望替换成的分支名称");if(e){this.busy=!0;try{const{options:t}=(0,r.getComponentSettings)("autoUpdate");Object.values(t.urls).forEach((t=>{Object.values(t).forEach((t=>{const o=/^(https:\/\/github\.com\/.+\/Bilibili-Evolved\/raw\/)(.+?)(\/)/;if(o.test(t.url))return void(t.url=t.url.replace(o,`$1${e}$3`));const n=/^(https:\/\/raw\.githubusercontent\.com\/.+\/Bilibili-Evolved\/)(.+?)(\/)/;if(n.test(t.url))return void(t.url=t.url.replace(n,`$1${e}$3`));const r=/^(https:\/\/cdn\.jsdelivr\.net\/gh\/.+\/Bilibili-Evolved@)(.+?)(\/)/;r.test(t.url)?t.url=t.url.replace(r,`$1${e}$3`):console.log("skip record",t)}))})),i.Toast.info("替换完成","替换更新链接",3e3)}catch(e){(0,s.logError)(e)}finally{this.busy=!1}}}}}),n,[],!1,null,null,null);const c=l.exports}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.d(n,{component:()=>r});const r=(0,coreApis.componentApis.define.defineComponentMetadata)({name:"changeUpdateUrls",displayName:"更新链接替换",description:"批量更换已安装功能的更新链接的分支, 对本地安装的功能无效.",entry:none,tags:[componentsTags.utils],widget:{component:()=>Promise.resolve().then(o.bind(o,101)).then((e=>e.default))},commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7"});return n=n.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/change-update-urls"]=t():e["utils/change-update-urls"]=t()}(globalThis,(()=>(()=>{"use strict";var e={101:(e,t,o)=>{o.r(t),o.d(t,{default:()=>l});var n=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("DefaultWidget",{attrs:{name:"替换更新链接",icon:"mdi-file-replace-outline",disabled:e.busy},on:{click:function(t){return e.replaceBranch()}}})};n._withStripped=!0;const r=coreApis.settings,i=coreApis.toast,s=coreApis.utils.log,a=coreApis.ui;var c=function(e,t,o,n,r,i,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}(Vue.extend({components:{DefaultWidget:a.DefaultWidget},data:()=>({busy:!1}),methods:{async replaceBranch(){const e=window.prompt("输入希望替换成的分支名称");if(e){this.busy=!0;try{const{options:t}=(0,r.getComponentSettings)("autoUpdate");Object.values(t.urls).forEach((t=>{Object.values(t).forEach((t=>{const o=/^(https:\/\/github\.com\/.+\/Bilibili-Evolved\/raw\/)(.+?)(\/)/;if(o.test(t.url))return void(t.url=t.url.replace(o,`$1${e}$3`));const n=/^(https:\/\/raw\.githubusercontent\.com\/.+\/Bilibili-Evolved\/)(.+?)(\/)/;if(n.test(t.url))return void(t.url=t.url.replace(n,`$1${e}$3`));const r=/^(https:\/\/cdn\.jsdelivr\.net\/gh\/.+\/Bilibili-Evolved@)(.+?)(\/)/;r.test(t.url)?t.url=t.url.replace(r,`$1${e}$3`):console.log("skip record",t)}))})),i.Toast.info("替换完成","替换更新链接",3e3)}catch(e){(0,s.logError)(e)}finally{this.busy=!1}}}}}),n,[],!1,null,null,null);const l=c.exports}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.d(n,{component:()=>r});const r=(0,coreApis.componentApis.define.defineComponentMetadata)({name:"changeUpdateUrls",displayName:"更新链接替换",description:"批量更换已安装功能的更新链接的分支, 对本地安装的功能无效.",entry:none,tags:[componentsTags.utils],widget:{component:()=>Promise.resolve().then(o.bind(o,101)).then((e=>e.default))},commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7"});return n=n.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/change-update-urls.js.map
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/check-in-center"]=t():e["utils/check-in-center"]=t()}(globalThis,(()=>(()=>{"use strict";var e={606:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var o=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"multiple-widgets"},e._l(e.items,(function(n){return t("DefaultWidget",{key:n.name,attrs:{disabled:n.disabled,"data-name":n.name,name:n.displayName,icon:n.icon},on:{click:function(t){return e.runItemAction(n,t)}}})})),1)};o._withStripped=!0;const i=coreApis.ui,s=coreApis.ajax,r=coreApis.toast;var a=n(847);const c=coreApis.pluginApis.data,d=[{name:"seeds-to-coins",displayName:"瓜子换硬币",icon:"mdi-seed-outline",action:async()=>{const e=await(0,s.postTextWithCredentials)("https://api.live.bilibili.com/xlive/revenue/v1/wallet/silver2coin",new URLSearchParams({csrf:(0,a.getCsrf)(),csrf_token:(0,a.getCsrf)()})),t=JSON.parse(e);0!==t.code?r.Toast.info(t.message,"瓜子换硬币",3e3):r.Toast.success(`${t.message}\n剩余银瓜子:${t.data.silver}`,"瓜子换硬币",3e3)}}],[l]=(0,c.registerAndGetData)("checkInCenter.items",d);var p=function(e,t,n,o,i,s,r,a){var c,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),o&&(d.functional=!0),s&&(d._scopeId="data-v-"+s),r?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},d._ssrRegister=c):i&&(c=a?function(){i.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(e,t){return c.call(t),l(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:d}}(Vue.extend({components:{DefaultWidget:i.DefaultWidget},data:()=>({items:l}),methods:{async runItemAction(e,t){try{this.$set(e,"disabled",!0);const n=this.$el.querySelector(`[data-name='${e.name}']`);await e.action(n,t)}finally{e.disabled=!1}}}}),o,[],!1,null,null,null);const u=p.exports},847:e=>{e.exports=coreApis.utils}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.d(o,{component:()=>r});const i=coreApis.componentApis.define;var s=n(847);const r=(0,i.defineComponentMetadata)({name:"checkInCenter",displayName:"签到助手",description:{"zh-CN":"在功能面板中提供一些可以每日进行的操作."},tags:[componentsTags.utils],entry:none,widget:{component:()=>Promise.resolve().then(n.bind(n,606)).then((e=>e.default)),condition:()=>Boolean((0,s.getUID)())},commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7"});return o=o.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/check-in-center"]=t():e["utils/check-in-center"]=t()}(globalThis,(()=>(()=>{"use strict";var e={606:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var o=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"multiple-widgets"},e._l(e.items,(function(n){return t("DefaultWidget",{key:n.name,attrs:{disabled:n.disabled,"data-name":n.name,name:n.displayName,icon:n.icon},on:{click:function(t){return e.runItemAction(n,t)}}})})),1)};o._withStripped=!0;const i=coreApis.ui,s=coreApis.ajax,r=coreApis.toast;var a=n(847);const c=coreApis.pluginApis.data,d=[{name:"seeds-to-coins",displayName:"瓜子换硬币",icon:"mdi-seed-outline",action:async()=>{const e=await(0,s.postTextWithCredentials)("https://api.live.bilibili.com/xlive/revenue/v1/wallet/silver2coin",new URLSearchParams({csrf:(0,a.getCsrf)(),csrf_token:(0,a.getCsrf)()})),t=JSON.parse(e);0!==t.code?r.Toast.info(t.message,"瓜子换硬币",3e3):r.Toast.success(`${t.message}\n剩余银瓜子:${t.data.silver}`,"瓜子换硬币",3e3)}}],[l]=(0,c.registerAndGetData)("checkInCenter.items",d);var p=function(e,t,n,o,i,s,r,a){var c,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),o&&(d.functional=!0),s&&(d._scopeId="data-v-"+s),r?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},d._ssrRegister=c):i&&(c=a?function(){i.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(e,t){return c.call(t),l(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:d}}(Vue.extend({components:{DefaultWidget:i.DefaultWidget},data:()=>({items:l}),methods:{async runItemAction(e,t){try{this.$set(e,"disabled",!0);const n=this.$el.querySelector(`[data-name='${e.name}']`);await e.action(n,t)}finally{e.disabled=!1}}}}),o,[],!1,null,null,null);const u=p.exports},847:e=>{e.exports=coreApis.utils}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.d(o,{component:()=>r});const i=coreApis.componentApis.define;var s=n(847);const r=(0,i.defineComponentMetadata)({name:"checkInCenter",displayName:"签到助手",description:{"zh-CN":"在功能面板中提供一些可以每日进行的操作."},tags:[componentsTags.utils],entry:none,widget:{component:()=>Promise.resolve().then(n.bind(n,606)).then((e=>e.default)),condition:()=>Boolean((0,s.getUID)())},commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7"});return o=o.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/check-in-center.js.map
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/column-unlock"]=t():e["utils/column-unlock"]=t()}(globalThis,(()=>(()=>{var e,t,o={61:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=61,e.exports=t},26:e=>{"use strict";e.exports="(原名: 专栏文字选择, 现在专栏已经不限制选中文字了)\n\n避免专栏的文字复制后在最后带上出处信息, 更贴近原生的复制行为.\n"},479:e=>{"use strict";e.exports=coreApis.style}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,r.d(c,i),c},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";r.d(c,{component:()=>s});const e=coreApis.componentApis.define;let t=!1,o=!0;const n="column-unlock",i=async()=>{o=!0;const{addStyle:e}=await Promise.resolve().then(r.t.bind(r,479,23));e(".article-holder { user-select: text !important }",n),t||(t=!0,document.addEventListener("copy",(e=>{o&&e.stopImmediatePropagation()}),{capture:!0}))},s=(0,e.defineComponentMetadata)({name:"columnUnlock",displayName:"专栏复制优化",entry:i,reload:i,unload:async()=>{document.getElementById(n)?.remove(),o=!1},tags:[componentsTags.utils],urlInclude:["//www.bilibili.com/read/"],commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const e=r(61);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(r.t.bind(r,26,17)).then((e=>e.default))}})()})})(),c=c.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/column-unlock"]=t():e["utils/column-unlock"]=t()}(globalThis,(()=>(()=>{var e,t,o={61:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=61,e.exports=t},26:e=>{"use strict";e.exports="(原名: 专栏文字选择, 现在专栏已经不限制选中文字了)\n\n避免专栏的文字复制后在最后带上出处信息, 更贴近原生的复制行为.\n"},479:e=>{"use strict";e.exports=coreApis.style}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var c=n[e]={exports:{}};return o[e](c,c.exports,r),c.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,r.d(c,i),c},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";r.d(c,{component:()=>s});const e=coreApis.componentApis.define;let t=!1,o=!0;const n="column-unlock",i=async()=>{o=!0;const{addStyle:e}=await Promise.resolve().then(r.t.bind(r,479,23));e(".article-holder { user-select: text !important }",n),t||(t=!0,document.addEventListener("copy",(e=>{o&&e.stopImmediatePropagation()}),{capture:!0}))},s=(0,e.defineComponentMetadata)({name:"columnUnlock",displayName:"专栏复制优化",entry:i,reload:i,unload:async()=>{document.getElementById(n)?.remove(),o=!1},tags:[componentsTags.utils],urlInclude:["//www.bilibili.com/read/"],commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const e=r(61);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(r.t.bind(r,26,17)).then((e=>e.default))}})()})})(),c=c.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/column-unlock.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/comments/content-replace/handlers"]=t():e["utils/comments/content-replace/handlers"]=t()}(globalThis,(()=>(()=>{"use strict";var e={};const t=coreApis.pluginApis.data,n=coreApis.settings,r=e=>{try{const t=new URL(e);return Boolean(t)}catch(e){return!1}};class o{}const{options:s}=(0,n.getComponentSettings)("commentContentReplace"),c=[new class extends o{isKeywordMatch(e,t,n){return e instanceof Text&&(e.textContent.includes(t)&&r(n))}replaceContent(e,t,n){const r=e.textContent.indexOf(t);if(-1===r||!(e instanceof Text))return[];const o=new Text(e.textContent.substring(0,r)),s=((e,t)=>{const n=document.createElement("img");return n.src=e,n.alt=t,n.loading="lazy",n.style.width="50px",n.style.height="50px",n})(n,t),c=new Text(e.textContent.substring(r+t.length));return e.replaceWith(o,s,c),[c]}},new class extends o{isKeywordMatch(e,t,n){return e instanceof HTMLImageElement&&(e.alt===t&&r(n))}replaceContent(e,t,n){return e instanceof HTMLImageElement?(e.src=n,[]):[]}},new class extends o{isKeywordMatch(e,t){return e instanceof Text&&e.textContent.includes(t)}replaceContent(e,t,n){const r=e.textContent.indexOf(t);if(-1===r)return[];const o=e.textContent.substring(0,r),s=e.textContent.substring(r+t.length);return e.textContent=`${o}${n}${s}`,[]}},new class extends o{isKeywordMatch(e,t){return e instanceof HTMLImageElement&&e.alt===t}replaceContent(e,t,n){return e instanceof HTMLImageElement?(""===n?e.remove():e.replaceWith(new Text(n)),[]):[]}},new class extends o{isKeywordMatch(){return!0}replaceContent(e){return Array.from(e.childNodes)}}];(0,t.registerAndGetData)("commentContentReplace.handlers",[e=>{let{content:n}=e;const{replaceMap:r}=s,[o]=(0,t.registerAndGetData)("commentContentReplace.defaultHandler.replaceMap",r),a=e=>{e.forEach((e=>{Object.entries(o).forEach((t=>{let[n,r]=t;if(n===r||""===n)return;const o=c.find((t=>t.isKeywordMatch(e,n,r)));if(!o)return;const s=o.replaceContent(e,n,r);a(s)}))}))};a(n)}]);return e=e.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/comments/content-replace/handlers"]=t():e["utils/comments/content-replace/handlers"]=t()}(globalThis,(()=>(()=>{"use strict";var e={};const t=coreApis.pluginApis.data,n=coreApis.settings,r=e=>{try{const t=new URL(e);return Boolean(t)}catch(e){return!1}};class o{}const{options:s}=(0,n.getComponentSettings)("commentContentReplace"),c=[new class extends o{isKeywordMatch(e,t,n){return e instanceof Text&&(e.textContent.includes(t)&&r(n))}replaceContent(e,t,n){const r=e.textContent.indexOf(t);if(-1===r||!(e instanceof Text))return[];const o=new Text(e.textContent.substring(0,r)),s=((e,t)=>{const n=document.createElement("img");return n.src=e,n.alt=t,n.loading="lazy",n.style.width="50px",n.style.height="50px",n})(n,t),c=new Text(e.textContent.substring(r+t.length));return e.replaceWith(o,s,c),[c]}},new class extends o{isKeywordMatch(e,t,n){return e instanceof HTMLImageElement&&(e.alt===t&&r(n))}replaceContent(e,t,n){return e instanceof HTMLImageElement?(e.src=n,[]):[]}},new class extends o{isKeywordMatch(e,t){return e instanceof Text&&e.textContent.includes(t)}replaceContent(e,t,n){const r=e.textContent.indexOf(t);if(-1===r)return[];const o=e.textContent.substring(0,r),s=e.textContent.substring(r+t.length);return e.textContent=`${o}${n}${s}`,[]}},new class extends o{isKeywordMatch(e,t){return e instanceof HTMLImageElement&&e.alt===t}replaceContent(e,t,n){return e instanceof HTMLImageElement?(""===n?e.remove():e.replaceWith(new Text(n)),[]):[]}},new class extends o{isKeywordMatch(){return!0}replaceContent(e){return Array.from(e.childNodes)}}];(0,t.registerAndGetData)("commentContentReplace.handlers",[e=>{let{content:n}=e;const{replaceMap:r}=s,[o]=(0,t.registerAndGetData)("commentContentReplace.defaultHandler.replaceMap",r),a=e=>{e.forEach((e=>{Object.entries(o).forEach((t=>{let[n,r]=t;if(n===r||""===n)return;const o=c.find((t=>t.isKeywordMatch(e,n,r)));if(!o)return;const s=o.replaceContent(e,n,r);a(s)}))}))};a(n)}]);return e=e.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/comments/content-replace/handlers.js.map
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/comments/copy-link"]=t():e["utils/comments/copy-link"]=t()}(globalThis,(()=>(()=>{"use strict";var e,t,o={913:e=>{e.exports=coreApis.componentApis.utils.commentApis}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&r&&o;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>a[e]=()=>o[e]));return a.default=()=>o,n.d(i,a),i},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};n.d(i,{component:()=>p});const a=coreApis.componentApis.define,c=coreApis.utils,s=coreApis.utils.urls,p=(0,a.defineComponentMetadata)({name:"copyCommentsLink",displayName:"复制评论链接",description:{"zh-CN":"开启后, 可在每条评论的菜单中选择复制链接."},entry:async()=>{const{forEachCommentItem:e,addMenuItem:t}=await Promise.resolve().then(n.t.bind(n,913,23));e({added:e=>{const o=e=>{e.forEach((e=>{t(e,{className:"copy-link",text:"复制链接",action:async()=>{const t=(e=>{if(document.URL.match(/\/\/t\.bilibili\.com\/(\d+)/))return"";if(s.feedsUrls.every((e=>!(0,c.matchUrlPattern)(e))))return"";let t=e;for(;null!==t&&t!==document.body;){if(t.hasAttribute("data-did"))return`https://t.bilibili.com/${t.getAttribute("data-did")}`;t=t.parentElement}return""})(e.element)||document.URL.replace(location.hash,"");await navigator.clipboard.writeText(`${t}#reply${e.id}`)}})}))};o([e,...e.replies]),e.addEventListener("repliesUpdate",(e=>o(e.detail)))}})},tags:[componentsTags.utils],commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7"});return i=i.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/comments/copy-link"]=t():e["utils/comments/copy-link"]=t()}(globalThis,(()=>(()=>{"use strict";var e,t,o={913:e=>{e.exports=coreApis.componentApis.utils.commentApis}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>c[e]=()=>o[e]));return c.default=()=>o,n.d(i,c),i},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};n.d(i,{component:()=>p});const c=coreApis.componentApis.define,a=coreApis.utils,s=coreApis.utils.urls,p=(0,c.defineComponentMetadata)({name:"copyCommentsLink",displayName:"复制评论链接",description:{"zh-CN":"开启后, 可在每条评论的菜单中选择复制链接."},entry:async()=>{const{forEachCommentItem:e,addMenuItem:t}=await Promise.resolve().then(n.t.bind(n,913,23));e({added:e=>{const o=e=>{e.forEach((e=>{t(e,{className:"copy-link",text:"复制链接",action:async()=>{const t=(e=>{if(document.URL.match(/\/\/t\.bilibili\.com\/(\d+)/))return"";if(s.feedsUrls.every((e=>!(0,a.matchUrlPattern)(e))))return"";let t=e;for(;null!==t&&t!==document.body;){if(t.hasAttribute("data-did"))return`https://t.bilibili.com/${t.getAttribute("data-did")}`;t=t.parentElement}return""})(e.element)||document.URL.replace(location.hash,"");await navigator.clipboard.writeText(`${t}#reply${e.id}`)}})}))};o([e,...e.replies]),e.addEventListener("repliesUpdate",(e=>o(e.detail)))}})},tags:[componentsTags.utils],commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7"});return i=i.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/comments/copy-link.js.map
File diff suppressed because one or more lines are too long
@@ -1,9 +1,12 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/comments/disable-search-link"]=t():e["utils/comments/disable-search-link"]=t()}(globalThis,(()=>(()=>{var e,t,n={523:(e,t,n)=>{var o=n(955)((function(e){return e[1]}));o.push([e.id,":host(bili-rich-text) #contents a[data-type=search] {\n color: inherit !important;\n cursor: inherit !important;\n display: contents !important;\n}\n:host(bili-rich-text) #contents a[data-type=search] img {\n display: none;\n}",""]),e.exports=o},104:(e,t,n)=>{var o=n(955)((function(e){return e[1]}));o.push([e.id,".search-word.icon {\n display: none !important;\n}\n.reply-warp .reply-item .search-word.jump-link {\n color: inherit !important;\n cursor: text !important;\n}",""]),e.exports=o},955:e=>{"use strict";
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["utils/comments/disable-search-link"]=e():t["utils/comments/disable-search-link"]=e()}(globalThis,(()=>(()=>{var t,e,n={523:(t,e,n)=>{var r=n(904),o=n(955)(r);o.push([t.id,":host(bili-rich-text) #contents a[data-type=search] {\n color: inherit !important;\n cursor: inherit !important;\n display: contents !important;\n}\n:host(bili-rich-text) #contents a[data-type=search] img {\n display: none;\n}","",{version:3,sources:["webpack://./registry/lib/components/utils/comments/disable-search-link/disable-search-link-shadow.scss"],names:[],mappings:"AAAA;EACE,yBAAyB;EACzB,0BAA0B;EAC1B,4BAA4B;AAC9B;AACA;EACE,aAAa;AACf",sourcesContent:[":host(bili-rich-text) #contents a[data-type=search] {\n color: inherit !important;\n cursor: inherit !important;\n display: contents !important;\n}\n:host(bili-rich-text) #contents a[data-type=search] img {\n display: none;\n}"],sourceRoot:""}]),t.exports=o},104:(t,e,n)=>{var r=n(904),o=n(955)(r);o.push([t.id,".search-word.icon {\n display: none !important;\n}\n.reply-warp .reply-item .search-word.jump-link {\n color: inherit !important;\n cursor: text !important;\n}","",{version:3,sources:["webpack://./registry/lib/components/utils/comments/disable-search-link/disable-search-link.scss"],names:[],mappings:"AAAA;EACE,wBAAwB;AAC1B;AACA;EACE,yBAAyB;EACzB,uBAAuB;AACzB",sourcesContent:[".search-word.icon {\n display: none !important;\n}\n.reply-warp .reply-item .search-word.jump-link {\n color: inherit !important;\n cursor: text !important;\n}"],sourceRoot:""}]),t.exports=o},955:t=>{"use strict";
// eslint-disable-next-line func-names
e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},
t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},
// eslint-disable-next-line func-names
t.i=function(e,n,o){"string"==typeof e&&(
e.i=function(t,n,r){"string"==typeof t&&(
// eslint-disable-next-line no-param-reassign
e=[[null,e,""]]);var r={};if(o)for(var i=0;i<this.length;i++){
t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){
// eslint-disable-next-line prefer-destructuring
var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},453:(e,t,n)=>{var o=n(523);o&&o.__esModule&&(o=o.default),e.exports="string"==typeof o?o:o.toString()},762:(e,t,n)=>{var o=n(104);o&&o.__esModule&&(o=o.default),e.exports="string"==typeof o?o:o.toString()},157:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=157,e.exports=t},322:e=>{"use strict";e.exports="禁用评论区的搜索词链接."}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,r.d(i,a),i},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";r.d(i,{component:()=>c});const e=coreApis.componentApis.define,t=coreApis.componentApis.utils.commentApis,n=coreApis.shadowRoot,o=coreApis.utils,a="disableCommentsSearchLink";let s=!1;const c=(0,e.defineComponentMetadata)({name:a,displayName:"禁用评论区搜索词",instantStyles:[{name:a,style:()=>Promise.resolve().then(r.t.bind(r,762,23)),important:!0},{name:a,style:()=>Promise.resolve().then(r.t.bind(r,453,23)),shadowDom:!0}],tags:[componentsTags.utils,componentsTags.style],entry:async()=>{s=!0,(0,t.forEachCommentArea)((async e=>{e instanceof t.CommentAreaV3?e.commentAreaEntry.addEventListener(n.ShadowRootEvents.Updated,(e=>{e.detail.forEach((e=>{e.addedNodes.forEach((e=>{e instanceof HTMLAnchorElement&&"search"===e.getAttribute("data-type")&&(e.removeAttribute("href"),e.removeAttribute("target"))}))}))})):(0,o.preventEvent)(e.element,"click",(e=>{if(!(e.target instanceof HTMLElement&&s))return!1;const t=e.target;return!![".jump-link.search-word",".icon.search-word"].some((e=>t.matches(e)))}))}))},reload:()=>{s=!0},unload:()=>{s=!1},commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const e=r(157);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(r.t.bind(r,322,17)).then((e=>e.default))}})()})})(),i=i.component})()));
var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},904:t=>{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}t.exports=function(t){var n=e(t,4),r=n[1],o=n[3];if(!o)return r;if("function"==typeof btoa){
// eslint-disable-next-line no-undef
var i=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),s="/*# ".concat(a," */"),c=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[r].concat(c).concat([s]).join("\n")}return[r].join("\n")}},453:(t,e,n)=>{var r=n(523);r&&r.__esModule&&(r=r.default),t.exports="string"==typeof r?r:r.toString()},762:(t,e,n)=>{var r=n(104);r&&r.__esModule&&(r=r.default),t.exports="string"==typeof r?r:r.toString()},157:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=157,t.exports=e},322:t=>{"use strict";t.exports="禁用评论区的搜索词链接."}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,exports:{}};return n[t](i,i.exports,o),i.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&r&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>n[t]));return a.default=()=>n,o.d(i,a),i},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.d(i,{component:()=>c});const t=coreApis.componentApis.define,e=coreApis.componentApis.utils.commentApis,n=coreApis.shadowRoot,r=coreApis.utils,a="disableCommentsSearchLink";let s=!1;const c=(0,t.defineComponentMetadata)({name:a,displayName:"禁用评论区搜索词",instantStyles:[{name:a,style:()=>Promise.resolve().then(o.t.bind(o,762,23)),important:!0},{name:a,style:()=>Promise.resolve().then(o.t.bind(o,453,23)),shadowDom:!0}],tags:[componentsTags.utils,componentsTags.style],entry:async()=>{s=!0,(0,e.forEachCommentArea)((async t=>{t instanceof e.CommentAreaV3?t.commentAreaEntry.addEventListener(n.ShadowRootEvents.Updated,(t=>{t.detail.forEach((t=>{t.addedNodes.forEach((t=>{t instanceof HTMLAnchorElement&&"search"===t.getAttribute("data-type")&&(t.removeAttribute("href"),t.removeAttribute("target"))}))}))})):(0,r.preventEvent)(t.element,"click",(t=>{if(!(t.target instanceof HTMLElement&&s))return!1;const e=t.target;return!![".jump-link.search-word",".icon.search-word"].some((t=>e.matches(t)))}))}))},reload:()=>{s=!0},unload:()=>{s=!1},commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const t=o(157);return{...Object.fromEntries(t.keys().map((e=>[e.match(/index\.(.+)\.md$/)[1],t(e)]))),"zh-CN":()=>Promise.resolve().then(o.t.bind(o,322,17)).then((t=>t.default))}})()})})(),i=i.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/comments/disable-search-link.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +1,12 @@
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["utils/image-resolution"]=e():t["utils/image-resolution"]=e()}(globalThis,(()=>(()=>{var t,e,o={146:(t,e,o)=>{var n=o(955)((function(t){return t[1]}));n.push([t.id,".favInfo-box .collection-cover img,\n.favInfo-box .favInfo-cover img {\n width: 100% !important;\n object-position: left !important;\n}\n\n.bb-comment .sailing .sailing-img,\n.comment-bilibili-fold .sailing .sailing-img {\n width: 288px;\n}",""]),t.exports=n},955:t=>{"use strict";
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["utils/image-resolution"]=e():t["utils/image-resolution"]=e()}(globalThis,(()=>(()=>{var t,e,n={146:(t,e,n)=>{var o=n(904),r=n(955)(o);r.push([t.id,".favInfo-box .collection-cover img,\n.favInfo-box .favInfo-cover img {\n width: 100% !important;\n object-position: left !important;\n}\n\n.bb-comment .sailing .sailing-img,\n.comment-bilibili-fold .sailing .sailing-img {\n width: 288px;\n}","",{version:3,sources:["webpack://./registry/lib/components/utils/image-resolution/fix.scss"],names:[],mappings:"AAAA;;EAEE,sBAAsB;EACtB,gCAAgC;AAClC;;AAEA;;EAEE,YAAY;AACd",sourcesContent:[".favInfo-box .collection-cover img,\n.favInfo-box .favInfo-cover img {\n width: 100% !important;\n object-position: left !important;\n}\n\n.bb-comment .sailing .sailing-img,\n.comment-bilibili-fold .sailing .sailing-img {\n width: 288px;\n}"],sourceRoot:""}]),t.exports=r},955:t=>{"use strict";
// eslint-disable-next-line func-names
t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o=t(e);return e[2]?"@media ".concat(e[2]," {").concat(o,"}"):o})).join("")},
t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},
// eslint-disable-next-line func-names
e.i=function(t,o,n){"string"==typeof t&&(
e.i=function(t,n,o){"string"==typeof t&&(
// eslint-disable-next-line no-param-reassign
t=[[null,t,""]]);var i={};if(n)for(var r=0;r<this.length;r++){
t=[[null,t,""]]);var r={};if(o)for(var i=0;i<this.length;i++){
// eslint-disable-next-line prefer-destructuring
var a=this[r][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);n&&i[c[0]]||(o&&(c[2]?c[2]="".concat(o," and ").concat(c[2]):c[2]=o),e.push(c))}},e}},208:(t,e,o)=>{var n=o(146);n&&n.__esModule&&(n=n.default),t.exports="string"==typeof n?n:n.toString()},288:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=288,t.exports=e},903:t=>{"use strict";t.exports="对 200% 以上的屏幕 DPI 缩放请求更高分辨率的图片, 加载时间也会相应变长一些. (也会导致某些浏览器里出现图片闪动, 因为本质上是更换了图片源)\n\n由于 b 站在很多地方没有设置图片维持原比例, 如果计算后的图片尺寸超出原图尺寸则会产生错误的比例, 可以考虑在选项中手动降低缩放级别.\n\n`缩放级别` 选项:\n- `auto`: 根据 DPI 缩放超出 200% 的比例自动计算, 例如 250% 的缩放下会请求 1.5 倍尺寸的图片.\n- `数字`: 自定义尺寸的缩放倍率.\n"},104:t=>{"use strict";t.exports=coreApis.observer}},n={};function i(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={id:t,exports:{}};return o[t](r,r.exports,i),r.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,i.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var r=Object.create(null);i.r(r);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&n&&o;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>o[t]));return a.default=()=>o,i.d(r,a),r},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";i.d(r,{component:()=>f});const t=coreApis.componentApis.define,e=coreApis.componentApis.styledComponent,o=/@(\d+)[Ww](_(\d+)[Hh])?/,n=["#certify-img1","#certify-img2"],a=[".bili-avatar-img"],s=[".logo-img"],c=[".article-detail .article-content img"],l=(t,e)=>{const o=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT);let n=o.nextNode();for(;n;)e(n),n=o.nextNode()},d=async(t,e)=>{const{attributes:r}=await Promise.resolve().then(i.t.bind(i,104,23)),c=(i,r)=>{const c=i(t);if(null===c)return;if(n.some((e=>t.matches(e))))return;if(c.includes(","))return;const l=c.match(o);if(!l)return;const[,d,,u]=l,p=parseInt(t.getAttribute("data-resolution-width")||"0");if(parseInt(d)>=p&&0!==p)return;null===t.getAttribute("width")&&null===t.getAttribute("height")&&void 0!==u&&(s.some((e=>t.matches(e)))?(t.setAttribute("height",u),t.setAttribute("width",d)):a.some((e=>t.matches(e)))?t.setAttribute("height",u):t.setAttribute("width",d));const f=(t,e)=>t===1/0||e===1/0?c.replace(o,"@"):void 0===e?c.replace(o,`@${t}w`):c.replace(o,`@${t}w_${e}h`);if(void 0!==u){const o=e.getWidth(parseInt(d),t),n=e.getHeight(parseInt(u),t);t.setAttribute("data-resolution-width",o.toString()),r(t,f(o,n))}else{const o=e.getWidth(parseInt(d),t);t.setAttribute("data-resolution-width",o.toString()),r(t,f(o))}};r(t,(()=>{c((t=>t.getAttribute("src")),((t,e)=>t.setAttribute("src",e))),c((t=>t.getAttribute("srcset")),((t,e)=>t.setAttribute("srcset",e))),c((t=>t.style.backgroundImage),((t,e)=>t.style.backgroundImage=e))}))},u=(0,e.styledComponentEntry)((()=>Promise.resolve().then(i.t.bind(i,208,23))),(async t=>{let{settings:e}=t;const{allMutations:o}=await Promise.resolve().then(i.t.bind(i,104,23)),n="auto"===e.options.scale?window.devicePixelRatio<=2?1:window.devicePixelRatio/2:parseFloat(e.options.scale);if(1===n)return;const r={getWidth:(t,o)=>e.options.originalImageInArticles&&c.some((t=>o.matches(t)))?1/0:Math.round(n*t),getHeight:(t,o)=>e.options.originalImageInArticles&&c.some((t=>o.matches(t)))?1/0:Math.round(n*t)};l(document.body,(t=>d(t,r))),o((t=>{t.forEach((t=>t.addedNodes.forEach((t=>{t instanceof HTMLElement&&(d(t,r),"IMG"!==t.nodeName.toUpperCase()&&l(t,(t=>d(t,r))))}))))}))})),p=(0,t.defineOptionsMetadata)({scale:{displayName:"缩放级别",defaultValue:"auto"},originalImageInArticles:{displayName:"在专栏中请求原图",defaultValue:!1}}),f=(0,t.defineComponentMetadata)({name:"imageResolution",displayName:"高分辨率图片",tags:[componentsTags.utils],enabledByDefault:window.devicePixelRatio>1,entry:u,options:p,commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const t=i(288);return{...Object.fromEntries(t.keys().map((e=>[e.match(/index\.(.+)\.md$/)[1],t(e)]))),"zh-CN":()=>Promise.resolve().then(i.t.bind(i,903,17)).then((t=>t.default))}})()})})(),r=r.component})()));
var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},904:t=>{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var o,r,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(i.push(o.value),!e||i.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.exports=function(t){var n=e(t,4),o=n[1],r=n[3];if(!r)return o;if("function"==typeof btoa){
// eslint-disable-next-line no-undef
var i=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),s="/*# ".concat(a," */"),c=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[o].concat(c).concat([s]).join("\n")}return[o].join("\n")}},208:(t,e,n)=>{var o=n(146);o&&o.__esModule&&(o=o.default),t.exports="string"==typeof o?o:o.toString()},288:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=288,t.exports=e},903:t=>{"use strict";t.exports="对 200% 以上的屏幕 DPI 缩放请求更高分辨率的图片, 加载时间也会相应变长一些. (也会导致某些浏览器里出现图片闪动, 因为本质上是更换了图片源)\n\n由于 b 站在很多地方没有设置图片维持原比例, 如果计算后的图片尺寸超出原图尺寸则会产生错误的比例, 可以考虑在选项中手动降低缩放级别.\n\n`缩放级别` 选项:\n- `auto`: 根据 DPI 缩放超出 200% 的比例自动计算, 例如 250% 的缩放下会请求 1.5 倍尺寸的图片.\n- `数字`: 自定义尺寸的缩放倍率.\n"},104:t=>{"use strict";t.exports=coreApis.observer}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={id:t,exports:{}};return n[t](i,i.exports,r),i.exports}e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&o&&n;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>n[t]));return a.default=()=>n,r.d(i,a),i},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";r.d(i,{component:()=>p});const t=coreApis.componentApis.define,e=coreApis.componentApis.styledComponent,n=/@(\d+)[Ww](_(\d+)[Hh])?/,o=["#certify-img1","#certify-img2"],a=[".bili-avatar-img"],s=[".logo-img"],c=[".article-detail .article-content img"],l=(t,e)=>{const n=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT);let o=n.nextNode();for(;o;)e(o),o=n.nextNode()},u=async(t,e)=>{const{attributes:i}=await Promise.resolve().then(r.t.bind(r,104,23)),c=(r,i)=>{const c=r(t);if(null===c)return;if(o.some((e=>t.matches(e))))return;if(c.includes(","))return;const l=c.match(n);if(!l)return;const[,u,,f]=l,d=parseInt(t.getAttribute("data-resolution-width")||"0");if(parseInt(u)>=d&&0!==d)return;null===t.getAttribute("width")&&null===t.getAttribute("height")&&void 0!==f&&(s.some((e=>t.matches(e)))?(t.setAttribute("height",f),t.setAttribute("width",u)):a.some((e=>t.matches(e)))?t.setAttribute("height",f):t.setAttribute("width",u));const p=(t,e)=>t===1/0||e===1/0?c.replace(n,"@"):void 0===e?c.replace(n,`@${t}w`):c.replace(n,`@${t}w_${e}h`);if(void 0!==f){const n=e.getWidth(parseInt(u),t),o=e.getHeight(parseInt(f),t);t.setAttribute("data-resolution-width",n.toString()),i(t,p(n,o))}else{const n=e.getWidth(parseInt(u),t);t.setAttribute("data-resolution-width",n.toString()),i(t,p(n))}};i(t,(()=>{c((t=>t.getAttribute("src")),((t,e)=>t.setAttribute("src",e))),c((t=>t.getAttribute("srcset")),((t,e)=>t.setAttribute("srcset",e))),c((t=>t.style.backgroundImage),((t,e)=>t.style.backgroundImage=e))}))},f=(0,e.styledComponentEntry)((()=>Promise.resolve().then(r.t.bind(r,208,23))),(async t=>{let{settings:e}=t;const{allMutations:n}=await Promise.resolve().then(r.t.bind(r,104,23)),o="auto"===e.options.scale?window.devicePixelRatio<=2?1:window.devicePixelRatio/2:parseFloat(e.options.scale);if(1===o)return;const i={getWidth:(t,n)=>e.options.originalImageInArticles&&c.some((t=>n.matches(t)))?1/0:Math.round(o*t),getHeight:(t,n)=>e.options.originalImageInArticles&&c.some((t=>n.matches(t)))?1/0:Math.round(o*t)};l(document.body,(t=>u(t,i))),n((t=>{t.forEach((t=>t.addedNodes.forEach((t=>{t instanceof HTMLElement&&(u(t,i),"IMG"!==t.nodeName.toUpperCase()&&l(t,(t=>u(t,i))))}))))}))})),d=(0,t.defineOptionsMetadata)({scale:{displayName:"缩放级别",defaultValue:"auto"},originalImageInArticles:{displayName:"在专栏中请求原图",defaultValue:!1}}),p=(0,t.defineComponentMetadata)({name:"imageResolution",displayName:"高分辨率图片",tags:[componentsTags.utils],enabledByDefault:window.devicePixelRatio>1,entry:f,options:d,commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const t=r(288);return{...Object.fromEntries(t.keys().map((e=>[e.match(/index\.(.+)\.md$/)[1],t(e)]))),"zh-CN":()=>Promise.resolve().then(r.t.bind(r,903,17)).then((t=>t.default))}})()})})(),i=i.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/image-resolution.js.map
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/import-series"]=t():e["utils/import-series"]=t()}(globalThis,(()=>(()=>{"use strict";var e={d:(t,i)=>{for(var a in i)e.o(i,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:i[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{component:()=>r});const i=coreApis.componentApis.define,a=coreApis.utils,o=coreApis.spinQuery,s=coreApis.observer,n=coreApis.toast,c=async()=>{let e=function(e){return e[e.Collection=0]="Collection",e[e.Series=1]="Series",e}({});const t=new URL(window.location.href);let i,s;if(t.pathname.includes("seriesdetail"))s=t.searchParams.get("sid"),i=e.Series;else{if(!t.pathname.includes("collectiondetail"))return;s=t.searchParams.get("sid"),i=e.Collection}const c=t.pathname.split("/")[1],r=(0,a.getCsrf)(),l=await(0,o.select)(".page-head"),d=l.children[1],p=document.createElement("a");p.className="paly-all-btn",p.textContent="一键收藏",p.style.cssText="\n right: 6rem;\n display: block;\n text-align: center;\n width: 65px;\n ",l.insertBefore(p,d),p.onclick=async()=>{i===e.Series?await(async(e,t,i)=>{const s=(await fetch(`https://api.bilibili.com/x/series/archives?mid=${t}&series_id=${e}&only_normal=true&sort=desc&pn=1&ps=99999`).then((e=>e.json()))).data.archives,c=await(0,o.sq)((()=>document.getElementsByClassName("item cur")[0].innerHTML),(e=>""!==e));let r=0;for(;;){const e=await fetch("https://api.bilibili.com/x/v3/fav/folder/add",{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`title=${c}&csrf=${i}&privacy=0`}).then((e=>e.json()));if(0===e.code){r=e.data.id;break}await(0,a.delay)(2e3)}const l=" 过久未动即触发风控,等待一段时间自动继续",d=n.Toast.info(`0 / ${s.length}${l}`,"收藏系列");for(let e=0;e<s.length;e++)for(await(0,a.delay)(500);;){if(0===(await fetch("https://api.bilibili.com/x/v3/fav/resource/deal",{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`rid=${s[e].aid}&add_media_ids=${r}&type=2&csrf=${i}`}).then((e=>e.json()))).code){d.message=`${e+1} / ${s.length}${l}`;break}{const e=2e3*Math.random()+2e3;console.log(`请求失败,等待${(e/1e3).toFixed(1)}s后重试`),await(0,a.delay)(e)}}d.duration=1e3,n.Toast.success("完成","收藏系列",2e3)})(s,c,r):await(async(e,t)=>{for(;;){if(0===(await fetch("https://api.bilibili.com/x/v3/fav/season/fav",{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`platform=web&season_id=${e}&csrf=${t}`}).then((e=>e.json()))).code){n.Toast.success("成功","导入合集",2e3);break}await(0,a.delay)(2e3)}})(s,r)}},r=(0,i.defineComponentMetadata)({name:"importSeries",author:{name:"aiden",link:"https://github.com/swhoro"},displayName:"批量导入合集",tags:[componentsTags.utils],entry:()=>{(0,s.urlChange)((()=>{c()}))},description:{"zh-CN":"在合集页面制作一个批量导入按钮,可以新增所有合集内视频至同名收藏夹"},urlInclude:[/^https:\/\/space\.bilibili\.com\//],commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7"});return t=t.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/import-series"]=t():e["utils/import-series"]=t()}(globalThis,(()=>(()=>{"use strict";var e={d:(t,i)=>{for(var a in i)e.o(i,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:i[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{component:()=>r});const i=coreApis.componentApis.define,a=coreApis.utils,o=coreApis.spinQuery,s=coreApis.observer,n=coreApis.toast,c=async()=>{let e=function(e){return e[e.Collection=0]="Collection",e[e.Series=1]="Series",e}({});const t=new URL(window.location.href);let i,s;if(t.pathname.includes("seriesdetail"))s=t.searchParams.get("sid"),i=e.Series;else{if(!t.pathname.includes("collectiondetail"))return;s=t.searchParams.get("sid"),i=e.Collection}const c=t.pathname.split("/")[1],r=(0,a.getCsrf)(),l=await(0,o.select)(".page-head"),d=l.children[1],p=document.createElement("a");p.className="paly-all-btn",p.textContent="一键收藏",p.style.cssText="\n right: 6rem;\n display: block;\n text-align: center;\n width: 65px;\n ",l.insertBefore(p,d),p.onclick=async()=>{i===e.Series?await(async(e,t,i)=>{const s=(await fetch(`https://api.bilibili.com/x/series/archives?mid=${t}&series_id=${e}&only_normal=true&sort=desc&pn=1&ps=99999`).then((e=>e.json()))).data.archives,c=await(0,o.sq)((()=>document.getElementsByClassName("item cur")[0].innerHTML),(e=>""!==e));let r=0;for(;;){const e=await fetch("https://api.bilibili.com/x/v3/fav/folder/add",{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`title=${c}&csrf=${i}&privacy=0`}).then((e=>e.json()));if(0===e.code){r=e.data.id;break}await(0,a.delay)(2e3)}const l=" 过久未动即触发风控,等待一段时间自动继续",d=n.Toast.info(`0 / ${s.length}${l}`,"收藏系列");for(let e=0;e<s.length;e++)for(await(0,a.delay)(500);;){if(0===(await fetch("https://api.bilibili.com/x/v3/fav/resource/deal",{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`rid=${s[e].aid}&add_media_ids=${r}&type=2&csrf=${i}`}).then((e=>e.json()))).code){d.message=`${e+1} / ${s.length}${l}`;break}{const e=2e3*Math.random()+2e3;console.log(`请求失败,等待${(e/1e3).toFixed(1)}s后重试`),await(0,a.delay)(e)}}d.duration=1e3,n.Toast.success("完成","收藏系列",2e3)})(s,c,r):await(async(e,t)=>{for(;;){if(0===(await fetch("https://api.bilibili.com/x/v3/fav/season/fav",{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`platform=web&season_id=${e}&csrf=${t}`}).then((e=>e.json()))).code){n.Toast.success("成功","导入合集",2e3);break}await(0,a.delay)(2e3)}})(s,r)}},r=(0,i.defineComponentMetadata)({name:"importSeries",author:{name:"aiden",link:"https://github.com/swhoro"},displayName:"批量导入合集",tags:[componentsTags.utils],entry:()=>{(0,s.urlChange)((()=>{c()}))},description:{"zh-CN":"在合集页面制作一个批量导入按钮,可以新增所有合集内视频至同名收藏夹"},urlInclude:[/^https:\/\/space\.bilibili\.com\//],commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7"});return t=t.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/import-series.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/mall-link-redirect"]=t():e["utils/mall-link-redirect"]=t()}(globalThis,(()=>(()=>{var e,t,o={410:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=410,e.exports=t},697:e=>{"use strict";e.exports="将移动端的会员购链接转换为 PC 端的链接\n"}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var l={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>l[e]=()=>o[e]));return l.default=()=>o,n.d(i,l),i},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.d(i,{component:()=>e});const e=(0,coreApis.componentApis.define.defineComponentMetadata)({name:"mallLinkRedirect",displayName:"会员购链接重定向",tags:[componentsTags.utils],entry:()=>{const e=new URLSearchParams(location.search),t=e.get("id"),o=e.get("itemsId");Boolean(t||o)&&(null===t?null!==o&&location.assign(`https://show.bilibili.com/platform/malldetail.html?itemsId=${o}`):location.assign(` https://show.bilibili.com/platform/detail.html?id=${t}`))},urlInclude:["https://mall.bilibili.com"],commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const e=n(410);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(n.t.bind(n,697,17)).then((e=>e.default))}})()})})(),i=i.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/mall-link-redirect"]=t():e["utils/mall-link-redirect"]=t()}(globalThis,(()=>(()=>{var e,t,o={410:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=410,e.exports=t},697:e=>{"use strict";e.exports="将移动端的会员购链接转换为 PC 端的链接\n"}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var l={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>l[e]=()=>o[e]));return l.default=()=>o,n.d(i,l),i},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.d(i,{component:()=>e});const e=(0,coreApis.componentApis.define.defineComponentMetadata)({name:"mallLinkRedirect",displayName:"会员购链接重定向",tags:[componentsTags.utils],entry:()=>{const e=new URLSearchParams(location.search),t=e.get("id"),o=e.get("itemsId");Boolean(t||o)&&(null===t?null!==o&&location.assign(`https://show.bilibili.com/platform/malldetail.html?itemsId=${o}`):location.assign(` https://show.bilibili.com/platform/detail.html?id=${t}`))},urlInclude:["https://mall.bilibili.com"],commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const e=n(410);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(n.t.bind(n,697,17)).then((e=>e.default))}})()})})(),i=i.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/mall-link-redirect.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +1,12 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/subscribe-time-show"]=t():e["utils/subscribe-time-show"]=t()}(globalThis,(()=>(()=>{var e,t,o={267:(e,t,o)=>{var n=o(955)((function(e){return e[1]}));n.push([e.id,".space-head-follow.b-follow {\n position: relative;\n}\n.space-head-follow.b-follow .subscribe-time-text {\n position: absolute;\n top: -20px;\n left: 50%;\n transform: translateX(-50%);\n font-size: 12px;\n color: #fff;\n line-height: 16px;\n -webkit-user-select: none;\n user-select: none;\n pointer-events: none;\n white-space: nowrap;\n font-weight: 500;\n text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);\n}\n\n.relation-card-info__time {\n color: #888;\n font-size: 12px;\n margin-bottom: 4px;\n -webkit-user-select: none;\n user-select: none;\n}",""]),e.exports=n},955:e=>{"use strict";
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/subscribe-time-show"]=t():e["utils/subscribe-time-show"]=t()}(globalThis,(()=>(()=>{var e,t,n={267:(e,t,n)=>{var o=n(904),r=n(955)(o);r.push([e.id,".space-head-follow.b-follow {\n position: relative;\n}\n.space-head-follow.b-follow .subscribe-time-text {\n position: absolute;\n top: -20px;\n left: 50%;\n transform: translateX(-50%);\n font-size: 12px;\n color: #fff;\n line-height: 16px;\n -webkit-user-select: none;\n user-select: none;\n pointer-events: none;\n white-space: nowrap;\n font-weight: 500;\n text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);\n}\n\n.relation-card-info__time {\n color: #888;\n font-size: 12px;\n margin-bottom: 4px;\n -webkit-user-select: none;\n user-select: none;\n}","",{version:3,sources:["webpack://./registry/lib/components/utils/subscribe-time-show/subscribe-time.scss"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,SAAS;EACT,2BAA2B;EAC3B,eAAe;EACf,WAAW;EACX,iBAAiB;EACjB,yBAAiB;UAAjB,iBAAiB;EACjB,oBAAoB;EACpB,mBAAmB;EACnB,gBAAgB;EAChB,uCAAuC;AACzC;;AAEA;EACE,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,yBAAiB;UAAjB,iBAAiB;AACnB",sourcesContent:[".space-head-follow.b-follow {\n position: relative;\n}\n.space-head-follow.b-follow .subscribe-time-text {\n position: absolute;\n top: -20px;\n left: 50%;\n transform: translateX(-50%);\n font-size: 12px;\n color: #fff;\n line-height: 16px;\n user-select: none;\n pointer-events: none;\n white-space: nowrap;\n font-weight: 500;\n text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);\n}\n\n.relation-card-info__time {\n color: #888;\n font-size: 12px;\n margin-bottom: 4px;\n user-select: none;\n}"],sourceRoot:""}]),e.exports=r},955:e=>{"use strict";
// eslint-disable-next-line func-names
e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},
e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},
// eslint-disable-next-line func-names
t.i=function(e,o,n){"string"==typeof e&&(
t.i=function(e,n,o){"string"==typeof e&&(
// eslint-disable-next-line no-param-reassign
e=[[null,e,""]]);var i={};if(n)for(var r=0;r<this.length;r++){
e=[[null,e,""]]);var r={};if(o)for(var i=0;i<this.length;i++){
// eslint-disable-next-line prefer-destructuring
var a=this[r][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&i[c[0]]||(o&&(c[2]?c[2]="".concat(o," and ").concat(c[2]):c[2]=o),t.push(c))}},t}},937:(e,t,o)=>{var n=o(267);n&&n.__esModule&&(n=n.default),e.exports="string"==typeof n?n:n.toString()},479:e=>{"use strict";if("undefined"==typeof coreApis){var t=new Error("Cannot find module 'coreApis.style'");throw t.code="MODULE_NOT_FOUND",t}e.exports=coreApis.style}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,exports:{}};return o[e](r,r.exports,i),r.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var r=Object.create(null);i.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>o[e]));return a.default=()=>o,i.d(r,a),r},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";i.d(r,{component:()=>w});const e=coreApis.componentApis.define,t=coreApis.utils.log,o=coreApis.ajax,n=coreApis.spinQuery,a=coreApis.observer,s=coreApis.userInfo,c=(0,t.useScopedConsole)("关注时间显示"),l=".space-head-follow.b-follow",f="subscribe-time-text",p=".relation-card-info__uname",u=".relation-card-info",d="relation-card-info__time",m=".relation-card-info__sign",b={},h=(e,t,o)=>{const n=dq(`${p}[href*="/${e}"]`),i=n?.closest(u);if(!i||i.querySelector(`.${d}`))return;const r=document.createElement("div");r.className=d,r.textContent=`${o}${t}`,r.dataset.mid=e.toString();const a=i.querySelector(m);a?.parentNode&&a.parentNode.insertBefore(r,a.nextSibling)},y=(()=>{let e=!1;return()=>{e||(e=!0,requestAnimationFrame((()=>{e=!1,dqa(p).forEach((e=>{const t=e.href.match(/\/(\d+)/);if(!t)return;const o=Number(t[1]);if(Number.isNaN(o))return;const n=b[o];if(n){const e=new Date(1e3*n.mtime).toLocaleString();h(o,e,n.label)}}))})))}})();if(!unsafeWindow.subscribeTimeHooked){unsafeWindow.subscribeTimeHooked=!0;const e=unsafeWindow.fetch;unsafeWindow.fetch=new Proxy(e,{apply(e,t,o){const n="string"==typeof o[0]?o[0]:o[0].url,i=new URL(n,location.origin);return"api.bilibili.com"===i.hostname&&(i.pathname.includes("/x/relation/fans")||i.pathname.includes("/x/relation/followings"))?e.apply(t,o).then((e=>(e.clone().json().then((e=>{const t=e?.data?.list;Array.isArray(t)?t.forEach((e=>{if("number"==typeof e.mid&&"number"==typeof e.mtime){const t=n.includes("/fans")?"Ta 关注你的时间":"你关注 Ta 的时间";b[e.mid]={mtime:e.mtime,label:t};const o=new Date(1e3*e.mtime).toLocaleString();h(e.mid,o,t)}})):c.warn("接口数据结构异常:",e)})).catch((e=>{c.warn("JSON 解析失败:",e)})),e))).catch((e=>{throw c.warn("fetch 请求失败:",e),e})):e.apply(t,o)}})}const w=(0,e.defineComponentMetadata)({name:"subscribeTimeShow",displayName:"关注时间显示",author:{name:"CNOCM",link:"https://github.com/CNOCM"},tags:[componentsTags.utils],urlInclude:[/^https:\/\/space\.bilibili\.com\/\d+\/(relation|fans)\/(fans|follow)/,/https:\/\/space\.bilibili\.com\/\d+/],entry:async()=>{try{const{addImportantStyle:e}=await Promise.resolve().then(i.t.bind(i,479,23)),{default:t}=await Promise.resolve().then(i.t.bind(i,937,23));e(t,"subscribe-time-style")}catch(e){c.error("样式加载失败:",e)}(0,a.allMutations)(y);const e=(await(0,s.getUserInfo)()).mid,t=location.href.match(/space\.bilibili\.com\/(\d+)/);if(!t)return;const r=Number(t[1]);if(r===e)return void c.log("当前为本人空间,跳过关注时间显示");const p=await(0,o.bilibiliApi)((0,o.getJsonWithCredentials)(`https://api.bilibili.com/x/web-interface/relation?mid=${r}`)),u=p?.relation?.mtime;u&&(await(0,n.select)(l),(e=>{const t=dq(l);if(!t||t.querySelector(`.${f}`))return;"static"===getComputedStyle(t).position&&(t.style.position="relative");const o=document.createElement("div");o.className=f,o.textContent=`关注于 ${e}`,t.appendChild(o)})(new Date(1e3*u).toLocaleString()))},description:{"zh-CN":"在粉丝/关注列表及用户主页显示关注的具体时间。"},commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7"})})(),r=r.component})()));
var a=this[i][0];null!=a&&(r[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);o&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},904:e=>{"use strict";function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var o,r,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}e.exports=function(e){var n=t(e,4),o=n[1],r=n[3];if(!r)return o;if("function"==typeof btoa){
// eslint-disable-next-line no-undef
var i=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),s="/*# ".concat(a," */"),c=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[o].concat(c).concat([s]).join("\n")}return[o].join("\n")}},937:(e,t,n)=>{var o=n(267);o&&o.__esModule&&(o=o.default),e.exports="string"==typeof o?o:o.toString()},479:e=>{"use strict";if("undefined"==typeof coreApis){var t=new Error("Cannot find module 'coreApis.style'");throw t.code="MODULE_NOT_FOUND",t}e.exports=coreApis.style}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,exports:{}};return n[e](i,i.exports,r),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,r.d(i,a),i},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";r.d(i,{component:()=>y});const e=coreApis.componentApis.define,t=coreApis.utils.log,n=coreApis.ajax,o=coreApis.spinQuery,a=coreApis.observer,s=coreApis.userInfo,c=(0,t.useScopedConsole)("关注时间显示"),l=".space-head-follow.b-follow",u="subscribe-time-text",f=".relation-card-info__uname",p=".relation-card-info",m="relation-card-info__time",d=".relation-card-info__sign",A={},b=(e,t,n)=>{const o=dq(`${f}[href*="/${e}"]`),r=o?.closest(p);if(!r||r.querySelector(`.${m}`))return;const i=document.createElement("div");i.className=m,i.textContent=`${n}${t}`,i.dataset.mid=e.toString();const a=r.querySelector(d);a?.parentNode&&a.parentNode.insertBefore(i,a.nextSibling)},h=(()=>{let e=!1;return()=>{e||(e=!0,requestAnimationFrame((()=>{e=!1,dqa(f).forEach((e=>{const t=e.href.match(/\/(\d+)/);if(!t)return;const n=Number(t[1]);if(Number.isNaN(n))return;const o=A[n];if(o){const e=new Date(1e3*o.mtime).toLocaleString();b(n,e,o.label)}}))})))}})();if(!unsafeWindow.subscribeTimeHooked){unsafeWindow.subscribeTimeHooked=!0;const e=unsafeWindow.fetch;unsafeWindow.fetch=new Proxy(e,{apply(e,t,n){const o="string"==typeof n[0]?n[0]:n[0].url,r=new URL(o,location.origin);return"api.bilibili.com"===r.hostname&&(r.pathname.includes("/x/relation/fans")||r.pathname.includes("/x/relation/followings"))?e.apply(t,n).then((e=>(e.clone().json().then((e=>{const t=e?.data?.list;Array.isArray(t)?t.forEach((e=>{if("number"==typeof e.mid&&"number"==typeof e.mtime){const t=o.includes("/fans")?"Ta 关注你的时间":"你关注 Ta 的时间";A[e.mid]={mtime:e.mtime,label:t};const n=new Date(1e3*e.mtime).toLocaleString();b(e.mid,n,t)}})):c.warn("接口数据结构异常:",e)})).catch((e=>{c.warn("JSON 解析失败:",e)})),e))).catch((e=>{throw c.warn("fetch 请求失败:",e),e})):e.apply(t,n)}})}const y=(0,e.defineComponentMetadata)({name:"subscribeTimeShow",displayName:"关注时间显示",author:{name:"CNOCM",link:"https://github.com/CNOCM"},tags:[componentsTags.utils],urlInclude:[/^https:\/\/space\.bilibili\.com\/\d+\/(relation|fans)\/(fans|follow)/,/https:\/\/space\.bilibili\.com\/\d+/],entry:async()=>{try{const{addImportantStyle:e}=await Promise.resolve().then(r.t.bind(r,479,23)),{default:t}=await Promise.resolve().then(r.t.bind(r,937,23));e(t,"subscribe-time-style")}catch(e){c.error("样式加载失败:",e)}(0,a.allMutations)(h);const e=(await(0,s.getUserInfo)()).mid,t=location.href.match(/space\.bilibili\.com\/(\d+)/);if(!t)return;const i=Number(t[1]);if(i===e)return void c.log("当前为本人空间,跳过关注时间显示");const f=await(0,n.bilibiliApi)((0,n.getJsonWithCredentials)(`https://api.bilibili.com/x/web-interface/relation?mid=${i}`)),p=f?.relation?.mtime;p&&(await(0,o.select)(l),(e=>{const t=dq(l);if(!t||t.querySelector(`.${u}`))return;"static"===getComputedStyle(t).position&&(t.style.position="relative");const n=document.createElement("div");n.className=u,n.textContent=`关注于 ${e}`,t.appendChild(n)})(new Date(1e3*p).toLocaleString()))},description:{"zh-CN":"在粉丝/关注列表及用户主页显示关注的具体时间。"},commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7"})})(),i=i.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/subscribe-time-show.js.map
File diff suppressed because one or more lines are too long
@@ -1,4 +1,5 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/url-params-clean"]=t():e["utils/url-params-clean"]=t()}(globalThis,(()=>(()=>{var e,t,r={620:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=620,e.exports=t},95:e=>{"use strict";e.exports="自动删除网址中的多余跟踪参数。请注意这会导致浏览器历史记录出现重复的标题(分别是转换前后的网址),并可能导致后退要多退几次。\n\n- `清理页面中的 A 标签`: 清理视频简介、推荐列表、标签、评论中的链接。\n"},576:e=>{"use strict";e.exports=coreApis.lifeCycle},104:e=>{"use strict";e.exports=coreApis.observer}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return r[e](i,i.exports,o),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,a){if(1&a&&(r=this(r)),8&a)return r;if("object"==typeof r&&r){if(4&a&&r.__esModule)return r;if(16&a&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var n={};e=e||[null,t({}),t([]),t(t)];for(var s=2&a&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>n[e]=()=>r[e]));return n.default=()=>r,o.d(i,n),i},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.d(i,{component:()=>b,k:()=>f});const e=coreApis.componentApis.define,t=coreApis.settings,r=coreApis.utils,a=coreApis.utils.log,n=coreApis.pluginApis.data,s=coreApis.componentApis.utils.commentApis;var c=o(576);const l=coreApis.shadowRoot,d=async(e,t,r)=>{if(e){new MutationObserver(((e,t)=>e.forEach((e=>r(e,t))))).observe(e,t)}},m={attributes:!0,attributeFilter:["href"],childList:!0,subtree:!0,characterData:!1},u="网址参数清理",p="urlParamsClean",f=(0,a.useScopedConsole)(u),h=(0,e.defineOptionsMetadata)({cleanAnchors:{defaultValue:!0,displayName:"清理页面中的 A 标签"}}),b=(0,e.defineComponentMetadata)({name:p,displayName:u,entry:async()=>{if((0,r.isNotHtml)()||(0,r.isIframe)())return;
/* spell-checker: disable */const[e]=(0,n.registerAndGetData)("urlParamsClean.noClean",["videocard_series"]),[a]=(0,n.registerAndGetData)("urlParamsClean.params",["spm_id_from","from_source","from_spmid","from","seid","share_source","share_medium","share_plat","share_tag","share_session_id","share_from","bbid","ts","timestamp","unique_k","rt","tdsourcetag","accept_quality","broadcast_type","current_qn","current_quality","playurl_h264","playurl_h265","quality_description","network","network_status","platform_network_status","p2p_type","referfrom","visit_id","bsource","spm","hotRank","-Arouter","vd_source","is_story_h5","buvid","plat_id","goFrom","jumpLinkType","hasBack","noTitleBar","msource","live_from","plat_id","extra_jump_from","subarea_rank","popular_rank","launch_id","spmid","trackid","from_avid","from_comid"]),[i]=(0,n.registerAndGetData)("urlParamsClean.siteSpecifiedParams",[{match:/\/\/www\.bilibili\.com\/audio\/(au[\d]+|mycollection)/,param:"type"},{match:/\/\/live\.bilibili\.com\//,param:"session_id"},{match:/\/\/live\.bilibili\.com\//,param:"is_room_feed"},{match:/\/\/www\.bilibili\.com\/bangumi\//,param:"theme"},{match:/\/\/www\.bilibili\.com\/video\//,param:"mid"},{match:/\/\/www\.bilibili\.com\/video\//,param:"up_id"},{match:/\/\/mall\.bilibili\.com\//,param:"noReffer"}]),[u]=(0,n.registerAndGetData)("urlParamsClean.tailingSlash",[]),h=t=>{const o=new URL(t,location.origin),n=[...new URLSearchParams(o.search).entries()].map((e=>{let[t,r]=e;return`${t}=${encodeURIComponent(r)}`}));if(n.some((t=>e.some((e=>t.includes(e))))))return t;const s=n.filter((e=>!a.some((t=>e.startsWith(`${t}=`)))&&!i.some((t=>{let{match:r,param:a}=t;return document.URL.match(r)&&e.startsWith(`${a}=`)})))).join("&");u.forEach((e=>{let{match:t}=e;const a=o.pathname;(0,r.matchPattern)(a,t)&&a.endsWith("/")&&(o.pathname=a.slice(0,a.length-1))}));const c=s?`?${s}`:"";return o.search=c,o.toString()},b=e=>function(t,r,a){for(var o=arguments.length,i=new Array(o>3?o-3:0),n=3;n<o;n++)i[n-3]=arguments[n];if(null==a)return e.call(this,t,r,a,...i);const s=(()=>{try{return new URL(a,location.origin+location.pathname).toString()}catch(e){return f.warn("History API URL",`解析失败: ${a}`),a}})(),c=h(s);return c!==a?(f.log("History API 拦截",s,c),e.call(this,t,r,c,...i)):e.call(this,t,r,a,...i)},y=unsafeWindow.history.pushState;unsafeWindow.history.pushState=b(y);const _=unsafeWindow.history.replaceState;unsafeWindow.history.replaceState=b(_);(0,t.getComponentSettings)(p).options.cleanAnchors&&(async e=>{const t=t=>{if("A"!==t.nodeName||!t.href)return;const r=e(t.href);t.href!==r&&(f.info("清理A标签",t,t.href,r),t.href=r)},r=e=>{Array.from(e).forEach(t)},a=e=>{"href"===e.attributeName?t(e.target):e.addedNodes[0]&&e.addedNodes[0]instanceof HTMLElement&&r(e.addedNodes[0].querySelectorAll("a"))};(0,c.contentLoaded)((()=>{r(dqa(".tag-panel .tag-link")),d(dq(".tag-panel"),m,a),d(dq("#v_desc"),{childList:!0,subtree:!0,characterData:!1},(e=>{e.addedNodes.length>0&&e.target instanceof HTMLElement&&r(e.target.querySelectorAll("a"))})),r(dqa(".recommend-list-container a")),d(dq(".rcmd-tab,.recommend-list-container"),m,a),(0,s.forEachCommentArea)((async e=>{e instanceof s.CommentAreaV3&&e.commentAreaEntry.addEventListener(l.ShadowRootEvents.Updated,(e=>e.detail.forEach((e=>{e.addedNodes.forEach((e=>t(e)))}))))}))}))})(h);const{fullyLoaded:g}=await Promise.resolve().then(o.t.bind(o,576,23)),{urlChange:v}=await Promise.resolve().then(o.t.bind(o,104,23));g((()=>{v((()=>(()=>{const e=h(document.URL);e!==document.URL&&(f.log("直接清理",document.URL,e),window.history.replaceState(history.state,"",e))})()))}))},options:h,tags:[componentsTags.utils],
/* spell-checker: disable */
urlExclude:[/game\.bilibili\.com\/fgo/,/live\.bilibili\.com\/p\/html\/live-app-hotrank\//],commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const e=o(620);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(o.t.bind(o,95,17)).then((e=>e.default))}})()})})(),i=i.component})()));
urlExclude:[/game\.bilibili\.com\/fgo/,/live\.bilibili\.com\/p\/html\/live-app-hotrank\//],commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const e=o(620);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(o.t.bind(o,95,17)).then((e=>e.default))}})()})})(),i=i.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/url-params-clean.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/watchlater-page-redirect"]=t():e["utils/watchlater-page-redirect"]=t()}(globalThis,(()=>(()=>{var e,t,o={990:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=990,e.exports=t},13:e=>{"use strict";e.exports="重定向**稍后再看页面**到普通视频页面,和`稍后再看重定向`组件的区别在于,该组件是在进入稍后再看的视频页面后进行重定向,而非直接替换链接到普通视频的链接,用于补充`稍后再看重定向`组件的功能。\n"}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&r&&o;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>a[e]=()=>o[e]));return a.default=()=>o,n.d(i,a),i},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.d(i,{component:()=>t});const e=coreApis.componentApis.define,t=(0,e.defineComponentMetadata)({name:"watchlaterPageRedirect",displayName:"稍后再看页面-重定向",entry:async()=>{const e=(()=>{const{pathname:e,search:t}=window.location,o=t.match(/\?oid=(\d+)&bvid=(\w+)/)??[];return"/list/watchlater"===e&&3===o.length?o[2]:null})();e&&(location.href=`https://www.bilibili.com/video/${e}/`)},author:{name:"magicFeirl",link:"https://github.com/magicFeirl"},urlInclude:["https://www.bilibili.com/list/watchlater"],tags:[componentsTags.utils,componentsTags.video],commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const e=n(990);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(n.t.bind(n,13,17)).then((e=>e.default))}})()})})(),i=i.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/watchlater-page-redirect"]=t():e["utils/watchlater-page-redirect"]=t()}(globalThis,(()=>(()=>{var e,t,o={990:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=990,e.exports=t},13:e=>{"use strict";e.exports="重定向**稍后再看页面**到普通视频页面,和`稍后再看重定向`组件的区别在于,该组件是在进入稍后再看的视频页面后进行重定向,而非直接替换链接到普通视频的链接,用于补充`稍后再看重定向`组件的功能。\n"}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return o[e](i,i.exports,n),i.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var i=Object.create(null);n.r(i);var c={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>c[e]=()=>o[e]));return c.default=()=>o,n.d(i,c),i},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.d(i,{component:()=>t});const e=coreApis.componentApis.define,t=(0,e.defineComponentMetadata)({name:"watchlaterPageRedirect",displayName:"稍后再看页面-重定向",entry:async()=>{const e=(()=>{const{pathname:e,search:t}=window.location,o=t.match(/\?oid=(\d+)&bvid=(\w+)/)??[];return"/list/watchlater"===e&&3===o.length?o[2]:null})();e&&(location.href=`https://www.bilibili.com/video/${e}/`)},author:{name:"magicFeirl",link:"https://github.com/magicFeirl"},urlInclude:["https://www.bilibili.com/list/watchlater"],tags:[componentsTags.utils,componentsTags.video],commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const e=n(990);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(n.t.bind(n,13,17)).then((e=>e.default))}})()})})(),i=i.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/watchlater-page-redirect.js.map
File diff suppressed because one or more lines are too long
@@ -1 +1,2 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/watchlater-redirect"]=t():e["utils/watchlater-redirect"]=t()}(globalThis,(()=>(()=>{var e,t,r={346:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=346,e.exports=t},433:e=>{"use strict";e.exports="将稍后再看的链接重定向为普通播放网址.\n- `重定向页面`: 对稍后再看列表页面里的链接重定向.\n- `重定向顶栏`: 对 `自定义顶栏` 里的稍后再看链接重定向.\n"},674:e=>{"use strict";e.exports=coreApis.componentApis.video.watchlater},104:e=>{"use strict";e.exports=coreApis.observer},728:e=>{"use strict";e.exports=coreApis.spinQuery},765:e=>{"use strict";e.exports=coreApis.utils.log}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var n=Object.create(null);i.r(n);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,i.d(n,a),n},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";i.d(n,{component:()=>r});const e=coreApis.componentApis.define,t=(e,t)=>{try{const{bvid:r,cid:o,pages:i}=t,n=i.find((e=>e.cid===o))?.page??1,a=n>1?`https://www.bilibili.com/video/${r}/?p=${n}`:`https://www.bilibili.com/video/${r}/`,c=e.querySelector(".av-pic, .bili-cover-card");c.target="_blank",c.href=a;const s=e.querySelector(".av-about .t, .bili-video-card__title a, .video-card__right .title");s.target="_blank",s.href=a}catch(r){console.error(`[watchlater redirect] error at ${t.bvid}`,e,r)}},r=(0,e.defineComponentMetadata)({name:"watchlaterRedirect",displayName:"稍后再看重定向",entry:async e=>{let{settings:r}=e;if(!r.options.page)return;const{select:o}=await Promise.resolve().then(i.t.bind(i,728,23)),{childListSubtree:n}=await Promise.resolve().then(i.t.bind(i,104,23)),{getWatchlaterList:a}=await Promise.resolve().then(i.t.bind(i,674,23)),{useScopedConsole:c}=await Promise.resolve().then(i.t.bind(i,765,23)),s=c("稍后再看重定向"),l=await a(!0),d=await o(".watch-later-list .list-box > span, .watchlater-list");if(!d)return;const p=lodash.debounce((()=>{const e=d.querySelectorAll(".av-item, .video-card");s.log("run redirect, length =",e.length),e.forEach((e=>{(e=>{if((e=>{const t=e.querySelector(".av-pic, .bili-cover-card");return/video\/BV/.test(t.href)})(e))return;const r=(e=>{const t=e.querySelector(".av-pic, .bili-cover-card"),r=t.href.match(/bvid=([^&]+)/)?.[1];return r})(e);if(void 0===r)return void s.warn("bvid not found for",e.outerHTML);const o=l.find((e=>e.bvid===r));void 0!==o?(s.log("redirect for",r),t(e,o)):s.warn("bvid no match for",r)})(e)}))}),200);p(),n(d,(async e=>{e.forEach((e=>{[...e.addedNodes].some((e=>e instanceof HTMLElement&&["bili-video-card__wrap","video-card","watchlater-list-container"].some((t=>e.classList.contains(t)))))&&p()}))}))},options:{page:{displayName:"重定向页面",defaultValue:!0},navbar:{displayName:"重定向顶栏",defaultValue:!0}},urlInclude:["https://www.bilibili.com/watchlater/#/list","https://www.bilibili.com/watchlater/list#/list"],tags:[componentsTags.utils,componentsTags.video],commitHash:"6e9ccb7da5dc3d2329024cf17511aa902bae8117",coreVersion:"2.10.7",description:(()=>{const e=i(346);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(i.t.bind(i,433,17)).then((e=>e.default))}})()})})(),n=n.component})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/watchlater-redirect"]=t():e["utils/watchlater-redirect"]=t()}(globalThis,(()=>(()=>{var e,t,r={346:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=346,e.exports=t},433:e=>{"use strict";e.exports="将稍后再看的链接重定向为普通播放网址.\n- `重定向页面`: 对稍后再看列表页面里的链接重定向.\n- `重定向顶栏`: 对 `自定义顶栏` 里的稍后再看链接重定向.\n"},674:e=>{"use strict";e.exports=coreApis.componentApis.video.watchlater},104:e=>{"use strict";e.exports=coreApis.observer},728:e=>{"use strict";e.exports=coreApis.spinQuery},765:e=>{"use strict";e.exports=coreApis.utils.log}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var n=Object.create(null);i.r(n);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;"object"==typeof c&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,i.d(n,a),n},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";i.d(n,{component:()=>r});const e=coreApis.componentApis.define,t=(e,t)=>{try{const{bvid:r,cid:o,pages:i}=t,n=i.find((e=>e.cid===o))?.page??1,a=n>1?`https://www.bilibili.com/video/${r}/?p=${n}`:`https://www.bilibili.com/video/${r}/`,c=e.querySelector(".av-pic, .bili-cover-card");c.target="_blank",c.href=a;const s=e.querySelector(".av-about .t, .bili-video-card__title a, .video-card__right .title");s.target="_blank",s.href=a}catch(r){console.error(`[watchlater redirect] error at ${t.bvid}`,e,r)}},r=(0,e.defineComponentMetadata)({name:"watchlaterRedirect",displayName:"稍后再看重定向",entry:async e=>{let{settings:r}=e;if(!r.options.page)return;const{select:o}=await Promise.resolve().then(i.t.bind(i,728,23)),{childListSubtree:n}=await Promise.resolve().then(i.t.bind(i,104,23)),{getWatchlaterList:a}=await Promise.resolve().then(i.t.bind(i,674,23)),{useScopedConsole:c}=await Promise.resolve().then(i.t.bind(i,765,23)),s=c("稍后再看重定向"),l=await a(!0),d=await o(".watch-later-list .list-box > span, .watchlater-list");if(!d)return;const p=lodash.debounce((()=>{const e=d.querySelectorAll(".av-item, .video-card");s.log("run redirect, length =",e.length),e.forEach((e=>{(e=>{if((e=>{const t=e.querySelector(".av-pic, .bili-cover-card");return/video\/BV/.test(t.href)})(e))return;const r=(e=>{const t=e.querySelector(".av-pic, .bili-cover-card"),r=t.href.match(/bvid=([^&]+)/)?.[1];return r})(e);if(void 0===r)return void s.warn("bvid not found for",e.outerHTML);const o=l.find((e=>e.bvid===r));void 0!==o?(s.log("redirect for",r),t(e,o)):s.warn("bvid no match for",r)})(e)}))}),200);p(),n(d,(async e=>{e.forEach((e=>{[...e.addedNodes].some((e=>e instanceof HTMLElement&&["bili-video-card__wrap","video-card","watchlater-list-container"].some((t=>e.classList.contains(t)))))&&p()}))}))},options:{page:{displayName:"重定向页面",defaultValue:!0},navbar:{displayName:"重定向顶栏",defaultValue:!0}},urlInclude:["https://www.bilibili.com/watchlater/#/list","https://www.bilibili.com/watchlater/list#/list"],tags:[componentsTags.utils,componentsTags.video],commitHash:"26b9721794e82c7af25149c07c59cd830459ca70",coreVersion:"2.10.7",description:(()=>{const e=i(346);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(i.t.bind(i,433,17)).then((e=>e.default))}})()})})(),n=n.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/utils/watchlater-redirect.js.map
File diff suppressed because one or more lines are too long