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 Jun 19, 2023
1 parent 8fb78b3 commit 2bdef95
Show file tree
Hide file tree
Showing 21 changed files with 186 additions and 128 deletions.
18 changes: 9 additions & 9 deletions dist/chrome/background.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions dist/chrome/content_script.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/chrome/libs/foliate-js/make.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_brandName__",
"description": "__MSG_brandDescription__",
"version": "0.6.15",
"version": "0.6.16",
"default_locale": "en",
"background": {
"service_worker": "background.js"
Expand Down
18 changes: 9 additions & 9 deletions dist/chrome/options.js

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions dist/chrome/pdf/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//监听未捕获异常
window.addEventListener("unhandledrejection", noHandleError);

function noHandleError(event) {
if (event.reason && event.reason.indexOf("Missing PDF") >= 0) {
const ele = document.createElement("div");
ele.innerHTML = `
<div style="background:white;width:100vw;height: calc(100vh - 32px);display: flex;flex-direction: column;justify-content: center;align-items: center;font-size: 18px;">
<div style="font-weight: bold;font-size: 20px;">暂无权限导入该文件,请手动上传</div>
<div style="display: flex;flex-direction: row;margin-top: 12px;">
<span style="">请点击右上角</span>
<div style="position: relative;">
<button id="openFile" class="toolbarButton hiddenLargeView" title="打开文件" tabindex="31" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">打开</span>
</button>
</div>
<span style="margin-top: 2px;">上传 PDF 文件</span>
</div>
<div>或者拖拽文件到此窗口上传</div>
</div>
`
const viewer = document.querySelector("#viewer")
if (!viewer) return;
viewer.appendChild(ele);
}
}
1 change: 1 addition & 0 deletions dist/chrome/pdf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

<link rel="stylesheet" href="custom-pdf.css" />
<script src="viewer.js"></script>
<script src="entry.js"></script>
<link rel="stylesheet" href="./jquery/jquery-ui-1.13.2.min.css" />
<link rel="stylesheet" href="../styles/inject.css" /></head>

Expand Down
3 changes: 2 additions & 1 deletion dist/chrome/pdf/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,8 @@ const PDFViewerApplication = {
}
}
}
console.error(`${message}\n\n${moreInfoText.join("\n")}`);
throw `${message}\n\n${moreInfoText.join("\n")}`
// console.error(`${message}\n\n${moreInfoText.join("\n")}`);
},
progress(level) {
if (!this.loadingBar || this.downloadComplete) {
Expand Down
48 changes: 24 additions & 24 deletions dist/chrome/popup.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions dist/firefox/background.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions dist/firefox/content_script.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/firefox/libs/foliate-js/make.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_brandName__",
"description": "__MSG_brandDescription__",
"version": "0.6.15",
"version": "0.6.16",
"default_locale": "en",
"background": {
"scripts": [
Expand Down
18 changes: 9 additions & 9 deletions dist/firefox/options.js

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions dist/firefox/pdf/entry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//监听未捕获异常
window.addEventListener("unhandledrejection", noHandleError);

function noHandleError(event) {
if (event.reason && event.reason.indexOf("Missing PDF") >= 0) {
const ele = document.createElement("div");
ele.innerHTML = `
<div style="background:white;width:100vw;height: calc(100vh - 32px);display: flex;flex-direction: column;justify-content: center;align-items: center;font-size: 18px;">
<div style="font-weight: bold;font-size: 20px;">暂无权限导入该文件,请手动上传</div>
<div style="display: flex;flex-direction: row;margin-top: 12px;">
<span style="">请点击右上角</span>
<div style="position: relative;">
<button id="openFile" class="toolbarButton hiddenLargeView" title="打开文件" tabindex="31" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">打开</span>
</button>
</div>
<span style="margin-top: 2px;">上传 PDF 文件</span>
</div>
<div>或者拖拽文件到此窗口上传</div>
</div>
`
const viewer = document.querySelector("#viewer")
if (!viewer) return;
viewer.appendChild(ele);
}
}
1 change: 1 addition & 0 deletions dist/firefox/pdf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

<link rel="stylesheet" href="custom-pdf.css" />
<script src="viewer.js"></script>
<script src="entry.js"></script>
<link rel="stylesheet" href="./jquery/jquery-ui-1.13.2.min.css" />
<link rel="stylesheet" href="../styles/inject.css" /></head>

Expand Down
3 changes: 2 additions & 1 deletion dist/firefox/pdf/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,8 @@ const PDFViewerApplication = {
}
}
}
console.error(`${message}\n\n${moreInfoText.join("\n")}`);
throw `${message}\n\n${moreInfoText.join("\n")}`
// console.error(`${message}\n\n${moreInfoText.join("\n")}`);
},
progress(level) {
if (!this.loadingBar || this.downloadComplete) {
Expand Down
48 changes: 24 additions & 24 deletions dist/firefox/popup.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions dist/userscript/immersive-translate.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
value=""
/>
</div>
<script src="./options.js?v=5053a27734250e3ca8058ccd5d15fd21554b508613e177862e4614d19b8428e2"></script>
<script src="./options.js?v=957ac31961b61ed3ef40abc851c8d7f4586a72ee0aacdea49918ad8267111165"></script>
</body>
</html>
18 changes: 9 additions & 9 deletions docs/options/options.js

Large diffs are not rendered by default.

0 comments on commit 2bdef95

Please sign in to comment.