Skip to content

Commit

Permalink
update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 9, 2024
1 parent 8cfc003 commit 3fb5e44
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 23 deletions.
6 changes: 3 additions & 3 deletions dist/ebook/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/>

<title>E-Book Reader</title>
<link rel="stylesheet" href="../styles/inject.css?v=1704618156" />
<link rel="stylesheet" href="../styles/inject.css?v=1704773463" />
<style>
:root {
--active-bg: rgba(0, 0, 0, 0.05);
Expand Down Expand Up @@ -388,8 +388,8 @@ <h1 id="side-bar-title"></h1>
</svg>
</button>
</div>
<script src="../libs/foliate-js/ebook.js?v=1704618156" type="module"></script>
<script src="./ebook-global.js?v=1704618156"></script>
<script src="../libs/foliate-js/ebook.js?v=1704773463" type="module"></script>
<script src="./ebook-global.js?v=1704773463"></script>
<script src="../content_script.js"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions dist/ebook/make/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
content="default-src 'self' blob:; script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; style-src 'self' blob: 'unsafe-inline'; img-src 'self' blob: data:; connect-src 'self' blob: data:; frame-src blob: data:; object-src blob: data:; form-action 'none';"
/>
<title>E-Book Maker</title>
<link rel="stylesheet" href="../../styles/inject.css?v=1704618156" />
<link rel="stylesheet" href="../../styles/inject.css?v=1704773463" />
<style>
:root {
--active-bg: rgba(0, 0, 0, 0.05);
Expand Down Expand Up @@ -572,8 +572,8 @@ <h1 class="notranslate">
<div id="chapters"></div>
</div>

<script src="../../libs/foliate-js/make.js?v=1704618156" type="module"></script>
<script src="../ebook-builder-global.js?v=1704618156"></script>
<script src="../../libs/foliate-js/make.js?v=1704773463" type="module"></script>
<script src="../ebook-builder-global.js?v=1704773463"></script>
<script src="../../content_script.js" type="module"></script>
</body>
</html>
31 changes: 31 additions & 0 deletions dist/example/self-float.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Sample</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.absolute {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.relative {
contain: strict;
height: calc(100vh - 315px);
-webkit-mask-image: linear-gradient(0deg,hsla(0,0%,100%,0),#fff 5%,#fff 95%,hsla(0,0%,100%,0));
mask-image: linear-gradient(0deg,hsla(0,0%,100%,0),#fff 5%,#fff 95%,hsla(0,0%,100%,0));
overflow-y: scroll;
position: relative;
}
</style>
</head>
<body>
<p>Congratulations 🎉, you have learned how to use Immersive Translate. Try pressing and holding the floating ball on the right side of the page, which will open the quick settings panel.</p>
<p>🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉</p>
<script src="../global-assets/mock_gm.js"></script>
<script src="../immersive-translate.user.js"></script>
</body>
</html>
88 changes: 88 additions & 0 deletions dist/global-assets/mock_gm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
function GM_getValue(name, defaultVal) {
let value = localStorage.getItem(name) || defaultVal;
try {
return JSON.parse(value);
} catch (error) {
return value;
}
}

function GM_setValue(name, value) {
if (typeof value === "object") value = JSON.stringify(value);
localStorage.setItem(name, value);
}

function GM_deleteValue(name) {
localStorage.deleteValue(name);
}

function GM_listValues() {
var keys = [];
for (var i = 0; i < localStorage.length; i++) {
keys.push(localStorage.key(i));
}
return keys;
}

function GM_xmlhttpRequest(details) {
var xhr = new XMLHttpRequest();
xhr.open(details.method, details.url, true);

// 设置请求头
if (details.headers) {
for (var header in details.headers) {
if (details.headers.hasOwnProperty(header)) {
xhr.setRequestHeader(header, details.headers[header]);
}
}
}

// 处理响应
xhr.onload = function () {
if (xhr.status >= 200 && xhr.status < 300) {
// 请求成功,处理响应数据
console.log(JSON.parse(xhr.responseText));
if (details.onload) details.onload(xhr);
} else {
// 请求失败
console.error("Request failed: ", xhr.statusText);
if (details.onerror) details.onerror(xhr);
}
};

// 处理网络错误
xhr.onerror = function () {
console.error("Network error");
if (details.onerror) details.onerror(xhr);
};

// 发送请求
xhr.send(details.data); // 如果你的方法是POST或PUT,并且有数据要发送
}

function GM_registerMenuCommand(name, func, accessKey) {
console.log(`Menu command registered: ${name}`);
// 实际上,你需要在页面上添加一个用户界面元素,如按钮,并将 func 绑定为其点击事件处理程序
}

function GM_addStyle(css) {
var style = document.createElement("style");
style.type = "text/css";
style.innerHTML = css;
document.head.appendChild(style);
}

function GM_openInTab(url, openInBackground) {
window.open(url, "_blank");
}

window.GM = {
getValue: GM_getValue,
setValue: GM_setValue,
deleteValue: GM_deleteValue,
listValues: GM_listValues,
xmlhttpRequest: GM_xmlhttpRequest,
registerMenuCommand: GM_registerMenuCommand,
addStyle: GM_addStyle,
openInTab: GM_openInTab,
};
2 changes: 1 addition & 1 deletion dist/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ <h1 id="side-bar-title"></h1>
</svg>
</button>
</div>
<script src="./html.js?v=1704618156"></script>
<script src="./html.js?v=1704773463"></script>
<script src="../content_script.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion dist/libs/foliate-js/make.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(()=>{var gg=Object.defineProperty;var bg=(e,t)=>{for(var n in t)gg(e,n,{get:t[n],enumerable:!0})};var ee={BUILD_TIME:"2024-01-07T09:02:19.490Z",VERSION:"1.1.2",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root {
(()=>{var gg=Object.defineProperty;var bg=(e,t)=>{for(var n in t)gg(e,n,{get:t[n],enumerable:!0})};var ee={BUILD_TIME:"2024-01-09T04:10:46.632Z",VERSION:"1.1.2",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;
Expand Down
2 changes: 1 addition & 1 deletion dist/libs/subtitle/subtitle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(()=>{var ui=Object.defineProperty;var di=(e,t)=>{for(var r in t)ui(e,r,{get:t[r],enumerable:!0})};var A={BUILD_TIME:"2024-01-07T09:02:19.490Z",VERSION:"1.1.2",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root {
(()=>{var ui=Object.defineProperty;var di=(e,t)=>{for(var r in t)ui(e,r,{get:t[r],enumerable:!0})};var A={BUILD_TIME:"2024-01-09T04:10:46.632Z",VERSION:"1.1.2",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;
Expand Down
4 changes: 2 additions & 2 deletions dist/pdf/immservie.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/pdf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
type="application/l10n"
href="../pdf/locale/locale.properties"
/>
<script src="../build/pdf.js?v=1704618156"></script>
<script src="../build/pdf.js?v=1704773463"></script>

<script src="../pdf/entry.js?v=1704618156"></script>
<link rel="stylesheet" href="../pdf/viewer.css?v=1704618156" />
<script src="../pdf/viewer.js?v=1704618156"></script>
<link rel="stylesheet" href="../pdf/custom-pdf.css?v=1704618156" />
<script src="../pdf/entry.js?v=1704773463"></script>
<link rel="stylesheet" href="../pdf/viewer.css?v=1704773463" />
<script src="../pdf/viewer.js?v=1704773463"></script>
<link rel="stylesheet" href="../pdf/custom-pdf.css?v=1704773463" />
<link rel="stylesheet" href="../pdf/jquery/jquery-ui-1.13.2.css" />
<script src="../pdf/immservie.js?v=1704618156"></script>
<script src="../pdf/immservie.js?v=1704773463"></script>
<script src="../pdf/download/html2canvas.min.js"></script>
<script src="../pdf/download/pdf-lib-1.17.1.min.js"></script>
<link rel="stylesheet" href="../styles/inject.css" /></head>
Expand All @@ -60,7 +60,7 @@
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WVZZDLS"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<link rel="stylesheet" href="../pdf/entry.css?v=1704618156" />
<link rel="stylesheet" href="../pdf/entry.css?v=1704773463" />
<div id="outerContainer">
<div id="sidebarContainer">
<div id="toolbarSidebar">
Expand Down
6 changes: 5 additions & 1 deletion dist/styles/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
--font-family: system-ui, -apple-system, "Segoe UI", "Roboto", "Ubuntu",
"Cantarell", "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
--code-font-family:"Fira Code", "Consolas", "Monaco", "Courier New", monospace;
--line-height: 1.5;
--font-weight: 400;
--border-radius: 0.25rem;
Expand Down Expand Up @@ -619,4 +620,7 @@ article {
cursor: pointer;
border: 1px dashed var(--form-element-border-color);
text-align: center;
}
}
.code-editor {
font-family: var(--code-font-family);
}
8 changes: 4 additions & 4 deletions dist/subtitle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
/>
<title>Local Subtitle</title>

<link rel="stylesheet" href="../styles/pico.css?v=1704618156" />
<link rel="stylesheet" href="../styles/inject.css?v=1704618156" />
<link rel="stylesheet" href="./subtitle.css?v=1704618156" />
<link rel="stylesheet" href="../styles/pico.css?v=1704773463" />
<link rel="stylesheet" href="../styles/inject.css?v=1704773463" />
<link rel="stylesheet" href="./subtitle.css?v=1704773463" />
<style>
#drop-target {
height: 100vh;
Expand Down Expand Up @@ -69,7 +69,7 @@ <h4 class="notranslate">
</div>
</div>
<div id="mount"></div>
<script src="../libs/subtitle/subtitle.js?v=1704618156"></script>
<script src="../libs/subtitle/subtitle.js?v=1704773463"></script>
<script src="../content_script.js"></script>
</body>
</html>

0 comments on commit 3fb5e44

Please sign in to comment.