This commit is contained in:
Tw93
2023-06-04 10:46:59 +08:00
2 changed files with 24 additions and 15 deletions

View File

@@ -247,14 +247,21 @@ Pake's development can not be without these Hackers. They contributed a lot of c
<sub><b>Essesoul</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/AielloChan">
<img src="https://avatars.githubusercontent.com/u/7900765?v=4" width="90;" alt="AielloChan"/>
<br />
<sub><b>Aiello</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/m1911star">
<img src="https://avatars.githubusercontent.com/u/4948120?v=4" width="90;" alt="m1911star"/>
<br />
<sub><b>Horus</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/Pake-Actions">
<img src="https://avatars.githubusercontent.com/u/126550811?v=4" width="90;" alt="Pake-Actions"/>
@@ -262,13 +269,6 @@ Pake's development can not be without these Hackers. They contributed a lot of c
<sub><b>Pake Actions</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/AielloChan">
<img src="https://avatars.githubusercontent.com/u/7900765?v=4" width="90;" alt="AielloChan"/>
<br />
<sub><b>Aiello</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/QingZ11">
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
@@ -333,6 +333,13 @@ Pake's development can not be without these Hackers. They contributed a lot of c
<sub><b>Hyzhao</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/lakca">
<img src="https://avatars.githubusercontent.com/u/16255922?v=4" width="90;" alt="lakca"/>
<br />
<sub><b>Null</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/liusishan">
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>

View File

@@ -1,8 +1,10 @@
const shortcuts = {
ArrowUp: () => scrollTo(0, 0),
ArrowDown: () => scrollTo(0, document.body.scrollHeight),
ArrowLeft: () => window.history.back(),
ArrowRight: () => window.history.forward(),
// Don't use command + ArrowLeft or command + ArrowRight
// When editing text in page, it causes unintended page navigation.
// ArrowLeft: () => window.history.back(),
// ArrowRight: () => window.history.forward(),
'[': () => window.history.back(),
']': () => window.history.forward(),
r: () => window.location.reload(),
@@ -125,16 +127,16 @@ document.addEventListener('DOMContentLoaded', () => {
return;
}
let filename = anchorElement.download ? anchorElement.download : getFilenameFromUrl(absoluteUrl)
// Process download links for Rust to handle.
if (
/\.[a-zA-Z0-9]+$/i.test(removeUrlParameters(absoluteUrl)) &&
!externalDownLoadLink()
if ((anchorElement.download /* download attribute */ || e.metaKey /* Click anchor with meta key pressed could download any kind of resource. */)
&& !externalDownLoadLink()
) {
e.preventDefault();
invoke('download_file', {
params: {
url: absoluteUrl,
filename: getFilenameFromUrl(absoluteUrl),
filename,
},
});
}