refactor: remove ctrl+u capture
This commit is contained in:
parent
70bf8aca19
commit
9295c4a848
@ -3,8 +3,6 @@ import UI from "./UI";
|
||||
import Input from "./Input";
|
||||
import Author from "./Author";
|
||||
|
||||
const pkg = require("../../package.json");
|
||||
|
||||
declare const Handlebars: any;
|
||||
declare const Prism: any;
|
||||
|
||||
@ -29,19 +27,6 @@ declare const Prism: any;
|
||||
}
|
||||
});
|
||||
|
||||
let isCtrl = false;
|
||||
document.addEventListener('keyup', (e) => {
|
||||
if (e.ctrlKey) isCtrl = false;
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.ctrlKey) isCtrl = true;
|
||||
if (isCtrl && e.key === "u") {
|
||||
window.open(pkg.repository.url, "_blank");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Input.registerShortcut(Input.KONAMI_CODE, () => {
|
||||
window.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ", "_blank");
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user