diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-15 01:40:48 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-15 01:40:48 -0400 |
commit | cdff1a234be0d625c5c824707dbae32ffa6a76dd (patch) | |
tree | a9e029f2a98ad72e64d9e09a922ec39ab502a75b /Makefile.d/konami.js.patch | |
parent | f18a6c809f45e71175ced6050d7e57bf4e7e89ba (diff) | |
parent | 90873ef7de4bf842fbf6971836a373c555cfcbaa (diff) |
Merge branch 'master-nomake'
Diffstat (limited to 'Makefile.d/konami.js.patch')
-rw-r--r-- | Makefile.d/konami.js.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Makefile.d/konami.js.patch b/Makefile.d/konami.js.patch new file mode 100644 index 00000000..f6df91c4 --- /dev/null +++ b/Makefile.d/konami.js.patch @@ -0,0 +1,46 @@ +--- ..//web-cache/www/https/raw.github.com/snaptortoise/konami-js/c0f686e647765860ff4d2fcb7b48122785432b75/konami.js 2015-04-14 17:46:09.372597458 -0400 ++++ sitestatic/konami.js 2015-04-14 22:39:28.549281737 -0400 +@@ -56,7 +56,7 @@ + load: function(link){ + this.orig_keys = this.keys; + konami.addEvent(document,"touchmove",function(e){ +- if(e.touches.length == 1 && konami.iphone.capture==true){ ++ if(e.touches.length == 1 && konami.iphone.capture===true){ + var touch = e.touches[0]; + konami.iphone.stop_x = touch.pageX; + konami.iphone.stop_y = touch.pageY; +@@ -66,7 +66,7 @@ + } + }); + konami.addEvent(document,"touchend",function(evt){ +- if (konami.iphone.tap==true) konami.iphone.check_direction(link); ++ if (konami.iphone.tap===true) konami.iphone.check_direction(link); + },false); + konami.addEvent(document,"touchstart", function(evt){ + konami.iphone.start_x = evt.changedTouches[0].pageX +@@ -76,12 +76,12 @@ + }); + }, + check_direction: function(link){ +- x_magnitude = Math.abs(this.start_x-this.stop_x) +- y_magnitude = Math.abs(this.start_y-this.stop_y) +- x = ((this.start_x-this.stop_x) < 0) ? "RIGHT" : "LEFT"; +- y = ((this.start_y-this.stop_y) < 0) ? "DOWN" : "UP"; +- result = (x_magnitude > y_magnitude) ? x : y; +- result = (this.tap==true) ? "TAP" : result; ++ var x_magnitude = Math.abs(this.start_x-this.stop_x) ++ var y_magnitude = Math.abs(this.start_y-this.stop_y) ++ var x = ((this.start_x-this.stop_x) < 0) ? "RIGHT" : "LEFT"; ++ var y = ((this.start_y-this.stop_y) < 0) ? "DOWN" : "UP"; ++ var result = (x_magnitude > y_magnitude) ? x : y; ++ result = (this.tap===true) ? "TAP" : result; + + if (result==this.keys[0]) this.keys = this.keys.slice(1,this.keys.length) + if (this.keys.length==0) { +@@ -99,4 +99,4 @@ + } + + return konami; +-} +\ No newline at end of file ++} |