diff --git a/src/ts/app.ts b/src/ts/app.ts index 60e8165..77466b2 100644 --- a/src/ts/app.ts +++ b/src/ts/app.ts @@ -2,9 +2,24 @@ import API from "./API"; import UI from "./UI"; import Input from "./Input"; +const pkg = require("../../package.json"); + declare const Handlebars: 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"); }); diff --git a/tsconfig.json b/tsconfig.json index 0134443..e71f507 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "lib": ["ES2022", "DOM"], - "target": "ES2022" + "target": "ES2022", + "moduleResolution": "nodenext" } } \ No newline at end of file