Pass pakeConfig to web

This commit is contained in:
Tw93
2024-05-09 15:32:16 +08:00
parent 7bcaeb6d7e
commit 161ec7f247
5 changed files with 25 additions and 21 deletions

View File

@@ -88,14 +88,16 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
document.addEventListener('keyup', (event) => {
if (/windows|linux/i.test(navigator.userAgent) && event.ctrlKey) {
handleShortcut(event);
}
if (/macintosh|mac os x/i.test(navigator.userAgent) && event.metaKey) {
handleShortcut(event);
}
});
if (window['pakeConfig']?.disabled_web_shortcuts !== true) {
document.addEventListener('keyup', (event) => {
if (/windows|linux/i.test(navigator.userAgent) && event.ctrlKey) {
handleShortcut(event);
}
if (/macintosh|mac os x/i.test(navigator.userAgent) && event.metaKey) {
handleShortcut(event);
}
});
}
// Collect blob urls to blob by overriding window.URL.createObjectURL
function collectUrlToBlobs() {