mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add english translation
This commit is contained in:
parent
04c1831209
commit
5113f682b7
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Offline)
|
||||
// @version 255.24
|
||||
// @version 255.28
|
||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -886,7 +886,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/haruna-scale.min.js"] = (()=>{return(n,t)=>{const a="bilibili-haruna-scale";if($(a).length===0){t.applyStyleFromText(`\n <style id='${a}'>\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n </style>\n `)}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/hide-top-search.min.js"] = (()=>{return(e,r)=>{const t=[".nav-search-keyword",".search-keyword"];for(const e of t){new SpinQuery(()=>$(e),e=>e!==undefined&&e.length>0&&e.attr("placeholder").length>0,e=>e.attr("placeholder","搜索")).start()}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.de-DE.min.js"] = (()=>{return(r,e)=>{const n=new Map([[`*`,[]]]);return{export:{map:n}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.en-US.min.js"] = (()=>{return(e,o)=>{const t=new Map([[`主站`,`Home`],[`画友`,`Painting`],[`音频`,`Music`],[`游戏中心`,`Game`],[`直播`,`Live`],[`会员购`,`Shop`],[`漫画`,`Comic`],[`下载APP`,`APP`],[`大会员`,`VIP`],[`年度大会员`,`Annual VIP`],[`消息`,`Message`],[`动态`,`Activity`],[`稍后再看`,`Watchlater`],[`已加稍后再看`,`Added`],[`移除`,`Remove`],[`收藏`,`Favorite`],[`历史`,`History`],[`投稿`,`Upload`],[`关注`,[`Follow`,{selector:`.user-panel .text, .n .n-data .n-data-k`,text:`Following`}]],[`关注数`,`Following`],[`粉丝`,`Followers`],[`粉丝数`,`Followers`],[`已关注`,`Following`],[`回复我的`,`Reply`],[`@我的`,`@Mentioned`],[`收到的赞`,`Likes`],[`系统通知`,`System`],[`我的消息`,`Whisper`],[`主页`,`Home`],[`频道`,`Channel`],[`订阅`,`Subscriptions`],[`设置`,`Settings`],[`搜索`,`Search`],[`搜索视频`,`Search videos`],[`搜索设置项`,`Search settings`],[`查看全部`,`View more`],[`查看更多`,`View more`],[`视频`,`Video`],[`专栏`,`Column`],[`转发`,`Forward`],[`评论`,`Reviews`],[`赞`,`Like`],[`视角:`,`View: `],[`我自己`,`Myself`],[`新访客`,`New visitors`],[`我的粉丝`,`Followers`],[`暂时没有新动态了哦!`,`Nothing new at this moment...`],[`历史动态`,`History`],[`投稿了`,`posted`],[`更新了`,`updated`],[`番剧`,`Bangumi`],[`样式`,`Style`],[`工具`,`Tools`],[`触摸`,`Touch`],[`其他`,`Other`],[`正在直播`,`Live broadcasting`],[`投稿视频`,`Posted video`],[`展开全文`,`Expand`],[`*`,[]]]);return{export:{map:t}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.en-US.min.js"] = (()=>{return(e,t)=>{const o=new Map([[`主站`,`Home`],[`画友`,`Painting`],[`音频`,`Music`],[`游戏中心`,`Game`],[`直播`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Live`}],[`会员购`,`Shop`],[`漫画`,`Comic`],[`下载APP`,`APP`],[`大会员`,`VIP`],[`年度大会员`,`Annual VIP`],[`消息`,`Message`],[`动态`,`Activity`],[`稍后再看`,`Watchlater`],[`已加稍后再看`,`Added`],[`移除`,`Remove`],[`收藏`,`Favorite`],[`历史`,`History`],[`投稿`,`Upload`],[`关注`,[`Follow`,{selector:`.user-panel .text, .n .n-data .n-data-k`,text:`Following`}]],[`关注数`,`Following`],[`粉丝`,`Followers`],[`粉丝数`,`Followers`],[`已关注`,`Following`],[`回复我的`,`Reply`],[`@我的`,`@Mentioned`],[`收到的赞`,`Likes`],[`系统通知`,`System`],[`我的消息`,`Whisper`],[`主页`,`Home`],[`频道`,`Channel`],[`订阅`,`Subscriptions`],[`设置`,`Settings`],[`搜索`,`Search`],[`搜索视频`,`Search videos`],[`搜索设置项`,`Search settings`],[`查看全部`,`View more`],[`查看更多`,`View more`],[`视频`,`Video`],[`专栏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Column`}],[`转发`,`Forward`],[`评论`,`Reviews`],[`赞`,`Like`],[`视角:`,`View: `],[`我自己`,`Myself`],[`新访客`,`New visitors`],[`我的粉丝`,`Followers`],[`暂时没有新动态了哦!`,`Nothing new at this moment...`],[`历史动态`,`History`],[`投稿了`,`posted`],[`更新了`,`updated`],[`番剧`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Bangumi`}],[`样式`,`Style`],[`工具`,`Tools`],[`触摸`,`Touch`],[`其他`,`Other`],[`附加功能`,`Add-on features`],[`空空如也哦...`,`Nothing...`],[`正在直播`,`Live broadcasting`],[`投稿视频`,`Posted video`],[`展开全文`,`Expand`],[`动画`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Anime`}],[`科技`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Tech`}],[`游戏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Game`}],[`生活`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Life`}],[`国创`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Native`}],[`音乐`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Music`}],[`舞蹈`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Dance`}],[`数码`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Digital`}],[`鬼畜`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Kichiku`}],[`时尚`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Fashion`}],[`广告`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Ads`}],[`娱乐`,[{selector:`.elevator-module .nav-list .item`,not:true,text:`Entertainment`},{selector:`.primary-menu .nav-menu li .nav-name`,text:`Entmt`}]],[`电影`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Movie`}],[`TV剧`,{selector:`.elevator-module .nav-list .item`,not:true,text:`TV drama`}],[`影视`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Film`}],[`纪录片`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Documentary`}],[`放映厅`,`Cinema`],[`广场`,`Plaza`],[`小黑屋`,`Blackroom`],[`*`,[]]]);return{export:{map:o}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.ja-JP.min.js"] = (()=>{return(e,t)=>{const o=new Map([[`主站`,`ホーム`],[`画友`,`絵画`],[`音频`,`音楽`],[`游戏中心`,`ゲーム`],[`会员购`,`ショップ`],[`下载APP`,`アプリ`],[`大会员`,`大会員`],[`消息`,`通知`],[`动态`,`情報`],[`稍后再看`,`後で鑑賞`],[`收藏`,`お気に入り`],[`历史`,`視聴履歴`],[`关注`,`フォロー`],[`粉丝`,`ファン`],[`更多`,`もっと`],[`排行`,`ランキング`],[`图片`,`ピクチャ`],[`视频`,`ビデオ`],[`音乐`,`音楽`],[`时尚`,`潮流`],[`电影`,`映画`],[`放映厅`,`映画館`],[`娱乐`,`娯楽`],[`广告`,`広告`],[`广场`,`広場`],[`发布`,`発表`],[`举报`,`告発`],[`首页`,`ホーム`],[`热门`,`ヒット`],[`周一`,`月曜日`],[`周二`,`火曜日`],[`周三`,`水曜日`],[`周四`,`木曜日`],[`周五`,`金曜日`],[`周六`,`土曜日`],[`周日`,`日曜日`],[`动画`,{selector:`.elevator-module .nav-list .item`,not:true,text:`アニメ`}],[`舞蹈`,{selector:`.elevator-module .nav-list .item`,not:true,text:`ダンス`}],[`专栏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`コラム`}],[`游戏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`ゲーム`}],[`直播`,{selector:`.elevator-module .nav-list .item`,not:true,text:`生放送`}],[`数码`,{selector:`.elevator-module .nav-list .item`,not:true,text:`デジタル`}],[`*`,[]]]);return{export:{map:o}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.min.css"] = `.up-info .up-focus-btn{width:auto!important;padding:0 4px!important}.primary-menu .nav-menu .nav-name{white-space:pre!important}.dynamic-m .dyn_menu .line{display:none!important}.tag-panel .more-button{width:44px!important}.link-navbar .main-ctnr .nav-logo{width:70px!important}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.min.js"] = (()=>{return(e,t)=>{const a={"日本語":"ja-JP",English:"en-US","正體中文":"zh-TW",Deutsch:"de-DE"};class s{accepts(e){return e.nodeType===Node.ELEMENT_NODE}getValue(e){return e.nodeValue}setValue(e,t){e.nodeValue=t}getElement(e){return e}translate(e){const t=this.getValue(e);if(!t||typeof t!=="string"||t==="*"){return}const a=s.map.get(t.trim());if(a===undefined){return}if(typeof a==="string"){this.setValue(e,a)}else if(Array.isArray(a)){let t=null;for(const s of a){if(typeof s==="string"){t=s}else{const{text:a,selector:r,not:n}=s;if(this.getElement(e).matches(r)!==Boolean(n)){t=a}}}if(t!==null){this.setValue(e,t)}}else{const{text:t,selector:s,not:r}=a;if(this.getElement(e).matches(s)!==Boolean(r)){this.setValue(e,t)}}}static walk(e,t){const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null,false);let s=a.nextNode();while(s){t(s);s=a.nextNode()}}static translate(e){if(e.nodeType===Node.TEXT_NODE){s.textNode.translate(e);return}s.walk(e,e=>{for(const t of s.allTranslators){if(t.accepts(e)){t.translate(e)}}})}static translateCssMatches(){const e=s.map.get("*");if(!e){return}for(const{selector:t,text:a}of e){const e=document.querySelector(t);if(e){[...e.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE).forEach(e=>e.nodeValue=a)}}}}class r extends s{accepts(e){return e.nodeType===Node.TEXT_NODE}getElement(e){return e.parentElement}}class n extends s{getValue(e){return e.getAttribute("title")}setValue(e,t){e.setAttribute("title",t)}}class l extends s{accepts(e){return e.nodeName==="INPUT"&&e.type.toUpperCase()==="TEXT"||e.nodeName==="TEXTAREA"}getValue(e){return e.getAttribute("placeholder")}setValue(e,t){e.setAttribute("placeholder",t)}}s.textNode=new r;s.title=new n;s.placeholder=new l;s.allTranslators=[s.textNode,s.title,s.placeholder];(async()=>{const{map:r}=await t.importAsync(`i18n.${a[e.i18nLanguage]}`);s.map=r;s.translate(document.body);s.translateCssMatches();Observer.childListSubtree("body",e=>{e.forEach(e=>{if(e.addedNodes.length>0){s.translateCssMatches()}e.addedNodes.forEach(e=>{s.translate(e)})})})})();return{export:{Translator:s,TextNodeTranslator:r,TitleTranslator:n,PlaceholderTranslator:l}}}})();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview Offline)
|
||||
// @version 255.24
|
||||
// @version 255.28
|
||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -886,7 +886,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/haruna-scale.min.js"] = (()=>{return(n,t)=>{const a="bilibili-haruna-scale";if($(a).length===0){t.applyStyleFromText(`\n <style id='${a}'>\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n </style>\n `)}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/hide-top-search.min.js"] = (()=>{return(e,r)=>{const t=[".nav-search-keyword",".search-keyword"];for(const e of t){new SpinQuery(()=>$(e),e=>e!==undefined&&e.length>0&&e.attr("placeholder").length>0,e=>e.attr("placeholder","搜索")).start()}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.de-DE.min.js"] = (()=>{return(r,e)=>{const n=new Map([[`*`,[]]]);return{export:{map:n}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.en-US.min.js"] = (()=>{return(e,o)=>{const t=new Map([[`主站`,`Home`],[`画友`,`Painting`],[`音频`,`Music`],[`游戏中心`,`Game`],[`直播`,`Live`],[`会员购`,`Shop`],[`漫画`,`Comic`],[`下载APP`,`APP`],[`大会员`,`VIP`],[`年度大会员`,`Annual VIP`],[`消息`,`Message`],[`动态`,`Activity`],[`稍后再看`,`Watchlater`],[`已加稍后再看`,`Added`],[`移除`,`Remove`],[`收藏`,`Favorite`],[`历史`,`History`],[`投稿`,`Upload`],[`关注`,[`Follow`,{selector:`.user-panel .text, .n .n-data .n-data-k`,text:`Following`}]],[`关注数`,`Following`],[`粉丝`,`Followers`],[`粉丝数`,`Followers`],[`已关注`,`Following`],[`回复我的`,`Reply`],[`@我的`,`@Mentioned`],[`收到的赞`,`Likes`],[`系统通知`,`System`],[`我的消息`,`Whisper`],[`主页`,`Home`],[`频道`,`Channel`],[`订阅`,`Subscriptions`],[`设置`,`Settings`],[`搜索`,`Search`],[`搜索视频`,`Search videos`],[`搜索设置项`,`Search settings`],[`查看全部`,`View more`],[`查看更多`,`View more`],[`视频`,`Video`],[`专栏`,`Column`],[`转发`,`Forward`],[`评论`,`Reviews`],[`赞`,`Like`],[`视角:`,`View: `],[`我自己`,`Myself`],[`新访客`,`New visitors`],[`我的粉丝`,`Followers`],[`暂时没有新动态了哦!`,`Nothing new at this moment...`],[`历史动态`,`History`],[`投稿了`,`posted`],[`更新了`,`updated`],[`番剧`,`Bangumi`],[`样式`,`Style`],[`工具`,`Tools`],[`触摸`,`Touch`],[`其他`,`Other`],[`正在直播`,`Live broadcasting`],[`投稿视频`,`Posted video`],[`展开全文`,`Expand`],[`*`,[]]]);return{export:{map:t}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.en-US.min.js"] = (()=>{return(e,t)=>{const o=new Map([[`主站`,`Home`],[`画友`,`Painting`],[`音频`,`Music`],[`游戏中心`,`Game`],[`直播`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Live`}],[`会员购`,`Shop`],[`漫画`,`Comic`],[`下载APP`,`APP`],[`大会员`,`VIP`],[`年度大会员`,`Annual VIP`],[`消息`,`Message`],[`动态`,`Activity`],[`稍后再看`,`Watchlater`],[`已加稍后再看`,`Added`],[`移除`,`Remove`],[`收藏`,`Favorite`],[`历史`,`History`],[`投稿`,`Upload`],[`关注`,[`Follow`,{selector:`.user-panel .text, .n .n-data .n-data-k`,text:`Following`}]],[`关注数`,`Following`],[`粉丝`,`Followers`],[`粉丝数`,`Followers`],[`已关注`,`Following`],[`回复我的`,`Reply`],[`@我的`,`@Mentioned`],[`收到的赞`,`Likes`],[`系统通知`,`System`],[`我的消息`,`Whisper`],[`主页`,`Home`],[`频道`,`Channel`],[`订阅`,`Subscriptions`],[`设置`,`Settings`],[`搜索`,`Search`],[`搜索视频`,`Search videos`],[`搜索设置项`,`Search settings`],[`查看全部`,`View more`],[`查看更多`,`View more`],[`视频`,`Video`],[`专栏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Column`}],[`转发`,`Forward`],[`评论`,`Reviews`],[`赞`,`Like`],[`视角:`,`View: `],[`我自己`,`Myself`],[`新访客`,`New visitors`],[`我的粉丝`,`Followers`],[`暂时没有新动态了哦!`,`Nothing new at this moment...`],[`历史动态`,`History`],[`投稿了`,`posted`],[`更新了`,`updated`],[`番剧`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Bangumi`}],[`样式`,`Style`],[`工具`,`Tools`],[`触摸`,`Touch`],[`其他`,`Other`],[`附加功能`,`Add-on features`],[`空空如也哦...`,`Nothing...`],[`正在直播`,`Live broadcasting`],[`投稿视频`,`Posted video`],[`展开全文`,`Expand`],[`动画`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Anime`}],[`科技`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Tech`}],[`游戏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Game`}],[`生活`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Life`}],[`国创`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Native`}],[`音乐`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Music`}],[`舞蹈`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Dance`}],[`数码`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Digital`}],[`鬼畜`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Kichiku`}],[`时尚`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Fashion`}],[`广告`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Ads`}],[`娱乐`,[{selector:`.elevator-module .nav-list .item`,not:true,text:`Entertainment`},{selector:`.primary-menu .nav-menu li .nav-name`,text:`Entmt`}]],[`电影`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Movie`}],[`TV剧`,{selector:`.elevator-module .nav-list .item`,not:true,text:`TV drama`}],[`影视`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Film`}],[`纪录片`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Documentary`}],[`放映厅`,`Cinema`],[`广场`,`Plaza`],[`小黑屋`,`Blackroom`],[`*`,[]]]);return{export:{map:o}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.ja-JP.min.js"] = (()=>{return(e,t)=>{const o=new Map([[`主站`,`ホーム`],[`画友`,`絵画`],[`音频`,`音楽`],[`游戏中心`,`ゲーム`],[`会员购`,`ショップ`],[`下载APP`,`アプリ`],[`大会员`,`大会員`],[`消息`,`通知`],[`动态`,`情報`],[`稍后再看`,`後で鑑賞`],[`收藏`,`お気に入り`],[`历史`,`視聴履歴`],[`关注`,`フォロー`],[`粉丝`,`ファン`],[`更多`,`もっと`],[`排行`,`ランキング`],[`图片`,`ピクチャ`],[`视频`,`ビデオ`],[`音乐`,`音楽`],[`时尚`,`潮流`],[`电影`,`映画`],[`放映厅`,`映画館`],[`娱乐`,`娯楽`],[`广告`,`広告`],[`广场`,`広場`],[`发布`,`発表`],[`举报`,`告発`],[`首页`,`ホーム`],[`热门`,`ヒット`],[`周一`,`月曜日`],[`周二`,`火曜日`],[`周三`,`水曜日`],[`周四`,`木曜日`],[`周五`,`金曜日`],[`周六`,`土曜日`],[`周日`,`日曜日`],[`动画`,{selector:`.elevator-module .nav-list .item`,not:true,text:`アニメ`}],[`舞蹈`,{selector:`.elevator-module .nav-list .item`,not:true,text:`ダンス`}],[`专栏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`コラム`}],[`游戏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`ゲーム`}],[`直播`,{selector:`.elevator-module .nav-list .item`,not:true,text:`生放送`}],[`数码`,{selector:`.elevator-module .nav-list .item`,not:true,text:`デジタル`}],[`*`,[]]]);return{export:{map:o}}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.min.css"] = `.up-info .up-focus-btn{width:auto!important;padding:0 4px!important}.primary-menu .nav-menu .nav-name{white-space:pre!important}.dynamic-m .dyn_menu .line{display:none!important}.tag-panel .more-button{width:44px!important}.link-navbar .main-ctnr .nav-logo{width:70px!important}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/i18n.min.js"] = (()=>{return(e,t)=>{const a={"日本語":"ja-JP",English:"en-US","正體中文":"zh-TW",Deutsch:"de-DE"};class s{accepts(e){return e.nodeType===Node.ELEMENT_NODE}getValue(e){return e.nodeValue}setValue(e,t){e.nodeValue=t}getElement(e){return e}translate(e){const t=this.getValue(e);if(!t||typeof t!=="string"||t==="*"){return}const a=s.map.get(t.trim());if(a===undefined){return}if(typeof a==="string"){this.setValue(e,a)}else if(Array.isArray(a)){let t=null;for(const s of a){if(typeof s==="string"){t=s}else{const{text:a,selector:r,not:n}=s;if(this.getElement(e).matches(r)!==Boolean(n)){t=a}}}if(t!==null){this.setValue(e,t)}}else{const{text:t,selector:s,not:r}=a;if(this.getElement(e).matches(s)!==Boolean(r)){this.setValue(e,t)}}}static walk(e,t){const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null,false);let s=a.nextNode();while(s){t(s);s=a.nextNode()}}static translate(e){if(e.nodeType===Node.TEXT_NODE){s.textNode.translate(e);return}s.walk(e,e=>{for(const t of s.allTranslators){if(t.accepts(e)){t.translate(e)}}})}static translateCssMatches(){const e=s.map.get("*");if(!e){return}for(const{selector:t,text:a}of e){const e=document.querySelector(t);if(e){[...e.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE).forEach(e=>e.nodeValue=a)}}}}class r extends s{accepts(e){return e.nodeType===Node.TEXT_NODE}getElement(e){return e.parentElement}}class n extends s{getValue(e){return e.getAttribute("title")}setValue(e,t){e.setAttribute("title",t)}}class l extends s{accepts(e){return e.nodeName==="INPUT"&&e.type.toUpperCase()==="TEXT"||e.nodeName==="TEXTAREA"}getValue(e){return e.getAttribute("placeholder")}setValue(e,t){e.setAttribute("placeholder",t)}}s.textNode=new r;s.title=new n;s.placeholder=new l;s.allTranslators=[s.textNode,s.title,s.placeholder];(async()=>{const{map:r}=await t.importAsync(`i18n.${a[e.i18nLanguage]}`);s.map=r;s.translate(document.body);s.translateCssMatches();Observer.childListSubtree("body",e=>{e.forEach(e=>{if(e.addedNodes.length>0){s.translateCssMatches()}e.addedNodes.forEach(e=>{s.translate(e)})})})})();return{export:{Translator:s,TextNodeTranslator:r,TitleTranslator:n,PlaceholderTranslator:l}}}})();
|
||||
|
||||
@ -59,7 +59,7 @@ utils\gui-settings\tooltip\settings-tooltip.js|BB6252A178DFF9DEDBAFCF10D205C1B24
|
||||
utils\hide-top-search.js|16390D91AFD803D26CCC32E7D97757E573B4C526
|
||||
utils\i18n\i18n.css|53EE05BF5DA8D2390E465D251CFC75BCB211BC63
|
||||
utils\i18n\i18n.de-DE.js|4FB9120C46A7146E5D0A756F68E043A88B620FD8
|
||||
utils\i18n\i18n.en-US.js|761963C3B39AF9412284E0A7C35F9509EA2E5FA5
|
||||
utils\i18n\i18n.en-US.js|9BF7591A63D3C29E9EFAC03E87B3314C076A36A2
|
||||
utils\i18n\i18n.ja-JP.js|3DD2B9856B7DDF7C3A9CA39BB2C4930E0E500674
|
||||
utils\i18n\i18n.js|00DC1A2CE98E935DFE3D6314432EC2AAE29E4440
|
||||
utils\i18n\i18n.ts|581C396A0FF8B3EEF6F780F390BDA7E0B33BEDEA
|
||||
|
||||
2
min/i18n.en-US.min.js
vendored
2
min/i18n.en-US.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,o)=>{const t=new Map([[`主站`,`Home`],[`画友`,`Painting`],[`音频`,`Music`],[`游戏中心`,`Game`],[`直播`,`Live`],[`会员购`,`Shop`],[`漫画`,`Comic`],[`下载APP`,`APP`],[`大会员`,`VIP`],[`年度大会员`,`Annual VIP`],[`消息`,`Message`],[`动态`,`Activity`],[`稍后再看`,`Watchlater`],[`已加稍后再看`,`Added`],[`移除`,`Remove`],[`收藏`,`Favorite`],[`历史`,`History`],[`投稿`,`Upload`],[`关注`,[`Follow`,{selector:`.user-panel .text, .n .n-data .n-data-k`,text:`Following`}]],[`关注数`,`Following`],[`粉丝`,`Followers`],[`粉丝数`,`Followers`],[`已关注`,`Following`],[`回复我的`,`Reply`],[`@我的`,`@Mentioned`],[`收到的赞`,`Likes`],[`系统通知`,`System`],[`我的消息`,`Whisper`],[`主页`,`Home`],[`频道`,`Channel`],[`订阅`,`Subscriptions`],[`设置`,`Settings`],[`搜索`,`Search`],[`搜索视频`,`Search videos`],[`搜索设置项`,`Search settings`],[`查看全部`,`View more`],[`查看更多`,`View more`],[`视频`,`Video`],[`专栏`,`Column`],[`转发`,`Forward`],[`评论`,`Reviews`],[`赞`,`Like`],[`视角:`,`View: `],[`我自己`,`Myself`],[`新访客`,`New visitors`],[`我的粉丝`,`Followers`],[`暂时没有新动态了哦!`,`Nothing new at this moment...`],[`历史动态`,`History`],[`投稿了`,`posted`],[`更新了`,`updated`],[`番剧`,`Bangumi`],[`样式`,`Style`],[`工具`,`Tools`],[`触摸`,`Touch`],[`其他`,`Other`],[`正在直播`,`Live broadcasting`],[`投稿视频`,`Posted video`],[`展开全文`,`Expand`],[`*`,[]]]);return{export:{map:t}}}})();
|
||||
(()=>{return(e,t)=>{const o=new Map([[`主站`,`Home`],[`画友`,`Painting`],[`音频`,`Music`],[`游戏中心`,`Game`],[`直播`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Live`}],[`会员购`,`Shop`],[`漫画`,`Comic`],[`下载APP`,`APP`],[`大会员`,`VIP`],[`年度大会员`,`Annual VIP`],[`消息`,`Message`],[`动态`,`Activity`],[`稍后再看`,`Watchlater`],[`已加稍后再看`,`Added`],[`移除`,`Remove`],[`收藏`,`Favorite`],[`历史`,`History`],[`投稿`,`Upload`],[`关注`,[`Follow`,{selector:`.user-panel .text, .n .n-data .n-data-k`,text:`Following`}]],[`关注数`,`Following`],[`粉丝`,`Followers`],[`粉丝数`,`Followers`],[`已关注`,`Following`],[`回复我的`,`Reply`],[`@我的`,`@Mentioned`],[`收到的赞`,`Likes`],[`系统通知`,`System`],[`我的消息`,`Whisper`],[`主页`,`Home`],[`频道`,`Channel`],[`订阅`,`Subscriptions`],[`设置`,`Settings`],[`搜索`,`Search`],[`搜索视频`,`Search videos`],[`搜索设置项`,`Search settings`],[`查看全部`,`View more`],[`查看更多`,`View more`],[`视频`,`Video`],[`专栏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Column`}],[`转发`,`Forward`],[`评论`,`Reviews`],[`赞`,`Like`],[`视角:`,`View: `],[`我自己`,`Myself`],[`新访客`,`New visitors`],[`我的粉丝`,`Followers`],[`暂时没有新动态了哦!`,`Nothing new at this moment...`],[`历史动态`,`History`],[`投稿了`,`posted`],[`更新了`,`updated`],[`番剧`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Bangumi`}],[`样式`,`Style`],[`工具`,`Tools`],[`触摸`,`Touch`],[`其他`,`Other`],[`附加功能`,`Add-on features`],[`空空如也哦...`,`Nothing...`],[`正在直播`,`Live broadcasting`],[`投稿视频`,`Posted video`],[`展开全文`,`Expand`],[`动画`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Anime`}],[`科技`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Tech`}],[`游戏`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Game`}],[`生活`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Life`}],[`国创`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Native`}],[`音乐`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Music`}],[`舞蹈`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Dance`}],[`数码`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Digital`}],[`鬼畜`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Kichiku`}],[`时尚`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Fashion`}],[`广告`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Ads`}],[`娱乐`,[{selector:`.elevator-module .nav-list .item`,not:true,text:`Entertainment`},{selector:`.primary-menu .nav-menu li .nav-name`,text:`Entmt`}]],[`电影`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Movie`}],[`TV剧`,{selector:`.elevator-module .nav-list .item`,not:true,text:`TV drama`}],[`影视`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Film`}],[`纪录片`,{selector:`.elevator-module .nav-list .item`,not:true,text:`Documentary`}],[`放映厅`,`Cinema`],[`广场`,`Plaza`],[`小黑屋`,`Blackroom`],[`*`,[]]]);return{export:{map:o}}}})();
|
||||
@ -3,7 +3,11 @@ export const map = new Map([
|
||||
[`画友`, `Painting`],
|
||||
[`音频`, `Music`],
|
||||
[`游戏中心`, `Game`],
|
||||
[`直播`, `Live`],
|
||||
[`直播`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Live`,
|
||||
}],
|
||||
[`会员购`, `Shop`],
|
||||
[`漫画`, `Comic`],
|
||||
[`下载APP`, `APP`],
|
||||
@ -43,7 +47,11 @@ export const map = new Map([
|
||||
[`查看全部`, `View more`],
|
||||
[`查看更多`, `View more`],
|
||||
[`视频`, `Video`],
|
||||
[`专栏`, `Column`],
|
||||
[`专栏`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Column`,
|
||||
}],
|
||||
[`转发`, `Forward`],
|
||||
[`评论`, `Reviews`],
|
||||
[`赞`, `Like`],
|
||||
@ -55,14 +63,109 @@ export const map = new Map([
|
||||
[`历史动态`, `History`],
|
||||
[`投稿了`, `posted`],
|
||||
[`更新了`, `updated`],
|
||||
[`番剧`, `Bangumi`],
|
||||
[`番剧`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Bangumi`,
|
||||
}],
|
||||
[`样式`, `Style`],
|
||||
[`工具`, `Tools`],
|
||||
[`触摸`, `Touch`],
|
||||
[`其他`, `Other`],
|
||||
[`附加功能`, `Add-on features`],
|
||||
[`空空如也哦...`, `Nothing...`],
|
||||
[`正在直播`, `Live broadcasting`],
|
||||
[`投稿视频`, `Posted video`],
|
||||
[`展开全文`, `Expand`],
|
||||
[`动画`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Anime`,
|
||||
}],
|
||||
[`科技`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Tech`,
|
||||
}],
|
||||
[`游戏`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Game`,
|
||||
}],
|
||||
[`生活`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Life`,
|
||||
}],
|
||||
[`国创`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Native`,
|
||||
}],
|
||||
[`音乐`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Music`,
|
||||
}],
|
||||
[`舞蹈`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Dance`,
|
||||
}],
|
||||
[`数码`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Digital`,
|
||||
}],
|
||||
[`鬼畜`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Kichiku`,
|
||||
}],
|
||||
[`时尚`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Fashion`,
|
||||
}],
|
||||
[`广告`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Ads`,
|
||||
}],
|
||||
[`娱乐`, [
|
||||
{
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Entertainment`,
|
||||
},
|
||||
{
|
||||
selector: `.primary-menu .nav-menu li .nav-name`,
|
||||
text: `Entmt`
|
||||
},
|
||||
]],
|
||||
[`电影`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Movie`,
|
||||
}],
|
||||
[`TV剧`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `TV drama`,
|
||||
}],
|
||||
[`影视`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Film`,
|
||||
}],
|
||||
[`纪录片`, {
|
||||
selector: `.elevator-module .nav-list .item`,
|
||||
not: true,
|
||||
text: `Documentary`,
|
||||
}],
|
||||
[`放映厅`, `Cinema`],
|
||||
[`广场`, `Plaza`],
|
||||
[`小黑屋`, `Blackroom`],
|
||||
/* Your translation here */
|
||||
[`*`, [
|
||||
/* CSS translation here */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user