You've already forked konami-code-snippets
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user