1
0
mirror of https://github.com/hexolan/konami-code-snippets.git synced 2026-05-20 11:39:22 +01:00

feat: remove added listener within core

docs: expand readme and show example
This commit is contained in:
2026-04-03 17:31:31 +01:00
parent e5b03ce4fd
commit 317034ef5d
5 changed files with 28 additions and 11 deletions
+25 -3
View File
@@ -10,13 +10,35 @@ Read more about the Konami Code from the associated [Wikipedia entry](https://en
### JSDelivr
stub
You can use this as a library within your web applications.
minified js (at set version tag)
#### Links
Version 1.0.0: <https://cdn.jsdelivr.net/gh/hexolan/konami-code-snippets@1.0.0/src/core.min.js>
Latest Version: <https://cdn.jsdelivr.net/gh/hexolan/konami-code-snippets/src/core.min.js>
#### Example
```html
<html>
<body>
(...content)
<script src="https://cdn.jsdelivr.net/gh/hexolan/konami-code-snippets/src/core.min.js" />
<script>
document.addEventListener("keydown", handleKonami(() => {
console.log('konami!');
}));
</script>
</body>
</html>
```
### Direct
stub
An example of direct usage can be seen within the source of [examples/redirect.html](/examples/redirect.html).
## License