This repository was archived by the owner on Apr 20, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ <h1 id="result"></h1>
2525 </ div >
2626 </ div >
2727 < script src ="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.2.min.js "> </ script >
28- < script src ="../../rx.js "> </ script >
29- < script src ="../../rx.aggregates.js "> </ script >
30- < script src ="../../rx.binding.js "> </ script >
28+ < script src ="../../dist/ rx.js "> </ script >
29+ < script src ="../../dist/ rx.aggregates.js "> </ script >
30+ < script src ="../../dist/ rx.binding.js "> </ script >
3131 < script src ="http://cdnjs.cloudflare.com/ajax/libs/rxjs-jquery/1.1.3/rx.jquery.js "> </ script >
3232 < script src ="konamicode.js "> </ script >
3333</ body >
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ $(function () {
1616
1717 $ ( document ) . keyupAsObservable ( )
1818 . map ( function ( e ) { return e . keyCode ; } ) // get the key code
19- . windowWithCount ( 10 , 10 ) // get the last 10 keys
20- . selectMany ( function ( x ) { // compare to known konmai code sequence
19+ . windowWithCount ( 10 , 1 ) // get the last 10 keys
20+ . selectMany ( function ( x ) { // compare to known konami code sequence
2121 return x . sequenceEqual ( konami ) ;
2222 } )
2323 . filter ( function ( equal ) { return equal ; } ) // where we match
2424 . subscribe ( function ( ) {
25- result . html ( 'KONAMI!' ) . fadeOut ( 2000 ) ; // print the result
25+ result . html ( 'KONAMI!' ) . show ( ) . fadeOut ( 2000 ) ; // print the result
2626 } ) ;
2727} ) ;
You can’t perform that action at this time.
0 commit comments