https://github.com/ahstro/elm-konami-code
Use the Konami Code to do awesome (or boring) stuff on your website.
https://github.com/ahstro/elm-konami-code
easter-egg konami
Last synced: 6 months ago
JSON representation
Use the Konami Code to do awesome (or boring) stuff on your website.
- Host: GitHub
- URL: https://github.com/ahstro/elm-konami-code
- Owner: ahstro
- License: bsd-3-clause
- Created: 2018-02-23T15:39:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-23T15:39:45.000Z (over 7 years ago)
- Last Synced: 2025-02-05T13:19:59.814Z (8 months ago)
- Topics: easter-egg, konami
- Language: Elm
- Homepage: http://package.elm-lang.org/packages/ahstro/elm-konami-code/latest
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-konami-code
Use the [Konami Code](https://en.wikipedia.org/wiki/Konami_Code) to do awesome (or boring) stuff on your website.
## Installation
```sh
elm-package install ahstro/elm-konami-code
```## Usage
```elm
import KonamiCode exposing (KonamiCode)type alias Model =
{ konamiCode : KonamiCode
}type Msg
= KonamiCodeMsg KonamiCode.Msginit : ( Model, Cmd Msg )
init =
( { konamiCode = KonamiCode.init }
, Cmd.none
)update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
KonamiCodeMsg msg ->
let
( newModel, konamiCodeEntered ) =
KonamiCode.update msg model
in
( { newModel
| showEasterEgg =
model.showEasterEgg || konamiCodeEntered
}
, Cmd.none
)subscriptions : Model -> Sub Msg
subscriptions model =
KonamiCode.subscribe KonamiCodeMsg
```