diff --git a/dist/chrome/background.js b/dist/chrome/background.js index 67a3ec2..ddecab8 100644 --- a/dist/chrome/background.js +++ b/dist/chrome/background.js @@ -1,4 +1,4 @@ -(()=>{var lc=Object.defineProperty;var ma=(t,e)=>{for(var r in e)lc(t,r,{get:e[r],enumerable:!0})};var m={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var lc=Object.defineProperty;var ma=(t,e)=>{for(var r in e)lc(t,r,{get:e[r],enumerable:!0})};var m={BUILD_TIME:"2024-04-04T07:37:00.000Z",VERSION:"1.4.6",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,22 +4936,22 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"chrome_zip"};var cc=Object.create,fn=Object.defineProperty,dc=Object.getOwnPropertyDescriptor,ho=Object.getOwnPropertyNames,pc=Object.getPrototypeOf,mc=Object.prototype.hasOwnProperty,gc=(t,e)=>function(){return e||(0,t[ho(t)[0]])((e={exports:{}}).exports,e),e.exports},hc=(t,e)=>{for(var r in e)fn(t,r,{get:e[r],enumerable:!0})},hn=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ho(e))!mc.call(t,n)&&n!==r&&fn(t,n,{get:()=>e[n],enumerable:!(a=dc(e,n))||a.enumerable});return t},fc=(t,e,r)=>(hn(t,e,"default"),r&&hn(r,e,"default")),fo=(t,e,r)=>(r=t!=null?cc(pc(t)):{},hn(e||!t||!t.__esModule?fn(r,"default",{value:t,enumerable:!0}):r,t)),bo=gc({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(r,a){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],a);else if(typeof t<"u")a(e);else{var n={exports:{}};a(n),r.browser=n.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(r){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let a="The message port closed before a response was received.",n=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class l extends WeakMap{constructor(g,S=void 0){super(S),this.createItem=g}get(g){return this.has(g)||this.set(g,this.createItem(g)),super.get(g)}}let s=C=>C&&typeof C=="object"&&typeof C.then=="function",u=(C,g)=>(...S)=>{i.runtime.lastError?C.reject(new Error(i.runtime.lastError.message)):g.singleCallbackArg||S.length<=1&&g.singleCallbackArg!==!1?C.resolve(S[0]):C.resolve(S)},c=C=>C==1?"argument":"arguments",d=(C,g)=>function(w,...L){if(L.length","
","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","
","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}}
+`))>=0;){let b=s.slice(0,h).trim();if(s=s.slice(h+1),b.startsWith("event:")||b==="")continue;let E="";if(b.startsWith("data:")&&(E=b.slice(5).trim()),E==="[DONE]")break;let ne;try{ne=JSON.parse(E??"")}catch(V){q.debug("json error",V);continue}u=ne}}return u}}else{let s;try{s=await l.text()}catch(b){q.error("parse response failed",b)}s&&q.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,h=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),h&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new Gt("fetchError",c).initNetWork(l.status)}}async function*eh(t){let e=t.getReader();try{for(;;){let{done:r,value:a}=await e.read();if(r)return;yield a}}finally{e.releaseLock()}}var th=new Map;function du(t){let e=rh(64),r=new CustomEvent(Hl,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((a,n)=>{th.set(e,(i,o)=>{i?n(i):a(o)})})}function rh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n","
","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","
","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}}
{{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}}
{{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request:
- id: 1
@@ -5317,11 +5317,11 @@ Translate the content to {{to}} Language:
?
?-\\|\\d+\\|-
?
-?`]},azure:{placeholderDelimiters:["@","#"]},you:{placeholderDelimiters:["@","#"]},openl:{placeholderDelimiters:["@","#"]},niu:{placeholderDelimiters:["@","#"]}},shortcuts:{toggleTranslatePage:"Alt+A",toggleTranslateTheWholePage:"Alt+W",toggleOnlyTransation:"",toggleTranslateToThePageEndImmediately:"",toggleTranslationMask:"",shareToDraft:"",toggleMouseHoverTranslateDirectly:""},tempTranslateDomainMinutes:0,translationParagraphLanguagePattern:{matches:["onboarding.immersivetranslate.com","www.reddit.com","old.reddit.com","twitter.com","www.tumblr.com","*.twitter.com","medium.com","*.medium.com","github.com","gist.github.com","www.facebook.com","www.youtube.com","m.youtube.com","read.readwise.io","www.inoreader.com","mail.google.com","google.com","discord.com","*.instagram.com","instagram.com","web.telegram.org","web.whatsapp.com","*.slack.com","*.indeed.com","outlook.live.com","https://bsky.app","store.steampowered.com","test-app.immersivetranslate.com","app.immersivetranslate.com"],excludeMatches:[],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],selectorExcludeMatches:[]},sourceLanguageUrlPattern:{},selectTranslationFont:"",translationFonts:["Microsoft YaHei","SimSun","NSimSun","SimHei","Microsoft JhengHei","KaiTi","FangSong","PingFang SC","STHeiti","STKaiti","STSong","STFangsong","STZhongsong","STHupo","STXinwei","STLiti","STXingkai","Hiragino Sans GB","Lantinghei SC","Hanzipen SC","Hannotate SC","Songti SC","Wawati SC","Weibei SC","Xingkai SC","Yapi SC","Yuanti SC","Arial Unicode MS","MingLiU-ExtB","Malgun Gothic","Arial","Calibri","Cambria","Candara","Consolas","Constantia","Corbel","Courier New","Georgia","Lucida Console","MingLiU","PMingLiU","MingLiU_HKSCS","Meiryo","MS Gothic","MS PGothic","MS UI Gothic","MS Mincho","MS PMincho","Segoe UI","Segoe UI Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Gulim","Dotum","Batang","Gungsuh","San Francisco","Helvetica Neue","Hiragino Mincho ProN","Hiragino Kaku Gothic ProN","Yu Gothic","Yu Mincho","Geeza Pro","Al Nile","Tehran","Devanagari MT","Kohinoor Devanagari","Apple SD Gothic Neo","Nanum Gothic"],generalRule:{_comment:"",isTranslateWhenServiceChanged:!0,glossaries:[{k:"LLM",v:""},{k:"LLMs",v:""}],excludeRegexps:["(<\\\\/?[a-zA-Z0-9]+(?:[^>]*?)>)","(