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> <sub><b>Essesoul</b></sub>
</a> </a>
</td> </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"> <td align="center">
<a href="https://github.com/m1911star"> <a href="https://github.com/m1911star">
<img src="https://avatars.githubusercontent.com/u/4948120?v=4" width="90;" alt="m1911star"/> <img src="https://avatars.githubusercontent.com/u/4948120?v=4" width="90;" alt="m1911star"/>
<br /> <br />
<sub><b>Horus</b></sub> <sub><b>Horus</b></sub>
</a> </a>
</td></tr> </td>
<tr>
<td align="center"> <td align="center">
<a href="https://github.com/Pake-Actions"> <a href="https://github.com/Pake-Actions">
<img src="https://avatars.githubusercontent.com/u/126550811?v=4" width="90;" alt="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> <sub><b>Pake Actions</b></sub>
</a> </a>
</td> </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"> <td align="center">
<a href="https://github.com/QingZ11"> <a href="https://github.com/QingZ11">
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="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> <sub><b>Hyzhao</b></sub>
</a> </a>
</td> </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"> <td align="center">
<a href="https://github.com/liusishan"> <a href="https://github.com/liusishan">
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/> <img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>

View File

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