Bilibili-Evolved/min/about.min.js
2020-10-30 17:42:34 +08:00

1 line
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>(e,t)=>{(async()=>{const i=await t.importAsync("aboutHtml");document.body.insertAdjacentHTML("beforeend",i);dq(".bilibili-evolved-about").addEventListener("be:about-load",(()=>{const t=(e,t)=>e.charCodeAt(0)-t.charCodeAt(0);const i=(e,i)=>t(e.name,i.name);const n=GM.info.script.name.match(/Bilibili Evolved \((.*)\)/);const o=n?n[1]:"Stable";new Vue({el:".bilibili-evolved-about",data:{version:e.currentVersion,clientType:o,logoImage:null,logoImageDark:null,branch:null,authors:[{name:"Grant Howard",link:"https://github.com/the1812"},{name:"Coulomb-G",link:"https://github.com/Coulomb-G"}],contributors:[{name:"PleiadeSubaru",link:"https://github.com/Etherrrr"},{name:"Lets-Halloween",link:"https://github.com/Lets-Halloween"},{name:"shugen002",link:"https://github.com/shugen002"},{name:"Joshuaふみひる",link:""},{name:"kdxcxs",link:"https://github.com/kdxcxs"},{name:"JLoeve",link:"https://github.com/LonelySteve"}].sort(i),fetching:true,participants:[],websites:[{name:"GitHub",link:"https://github.com/the1812/Bilibili-Evolved/"},{name:"Greasy Fork",link:"https://greasyfork.org/zh-CN/scripts/373563-bilibili-evolved"}],components:[{name:"Vue.js",link:"https://cn.vuejs.org/index.html"},{name:"Vuex",link:"https://vuex.vuejs.org/zh/"},{name:"JSZip",link:"https://stuk.github.io/jszip/"},{name:"jQuery",link:"http://jquery.com/"},{name:"debounce",link:"https://github.com/component/debounce/"},{name:"Slip.js",link:"https://github.com/kornelski/slip"},{name:"MDI",link:"https://materialdesignicons.com"},{name:"Lodash",link:"https://lodash.com/"}]},mounted(){dq(".bilibili-evolved-about").addEventListener("be:about-load-community",(()=>{this.init()}),{once:true})},methods:{async getLogos(){this.logoImage=await Ajax.getText(`https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/images/bilibili-evolved-wide.svg`);this.logoImageDark=await Ajax.getText(`https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/images/bilibili-evolved-wide-dark.svg`)},async init(){this.branch=/Preview|Local/.test(o)?"preview":"master";this.getLogos();const e=new Set;let t=[];let n=1;do{t=await Ajax.getJson(`https://api.github.com/repos/the1812/Bilibili-Evolved/issues?state=all&direction=asc&per_page=100&page=${n}`).catch((()=>{t=[{name:"电波无法到达(´・_・`)",link:null}]}));n++;for(const i of t){e.add(i.user.login)}}while(t.length>0);this.participants=[...e].map((e=>({name:e,link:`https://github.com/${e}`}))).filter((({link:e})=>!this.authors.some((t=>t.link===e))&&!this.contributors.some((t=>t.link===e)))).sort(i);this.fetching=false}}})}),{once:true})})()})();