[archweb] Origin of konami.js
diff mbox

Message ID 87r2qqrjlo.wl-lukeshu@lukeshu.com
State New
Headers show

Commit Message

Luke Shumaker Jan. 15, 2018, 7:46 p.m. UTC
Hi Dan,

I'm sorry to bother you.

In archweb commit bec4e79 (2013-02-09), you added
`sitestatic/konami.min.js`.  It is apparently
https://github.com/snaptortoise/konami-js commit ec0f686 run through
UglifyJS 2.2, but with a few modifications (below) made first.

Would it be correct to assume that you are the author of those
modifications?  If so, would you consent to re-licensing the
modifications to be under the MIT license; reflecting the upstream
license change in konami-js??

---

Comments

Eli Schwartz via arch-projects Jan. 28, 2018, 6:54 p.m. UTC | #1
No issues from my end with re-licensing these changes under the MIT license.

On Mon, Jan 15, 2018 at 1:46 PM, Luke Shumaker <lukeshu@lukeshu.com> wrote:

> Hi Dan,
>
> I'm sorry to bother you.
>
> In archweb commit bec4e79 (2013-02-09), you added
> `sitestatic/konami.min.js`.  It is apparently
> https://github.com/snaptortoise/konami-js commit ec0f686 run through
> UglifyJS 2.2, but with a few modifications (below) made first.
>
> Would it be correct to assume that you are the author of those
> modifications?  If so, would you consent to re-licensing the
> modifications to be under the MIT license; reflecting the upstream
> license change in konami-js??
>
> ---
>
> diff a/konami.js b/konami.js
> --- a/konami.js
> +++ b/konami.js
> @@ -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) {
> --
> Happy hacking,
> ~ Luke Shumaker
>
<div dir="ltr">No issues from my end with re-licensing these changes under the MIT license.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 15, 2018 at 1:46 PM, Luke Shumaker <span dir="ltr">&lt;<a href="mailto:lukeshu@lukeshu.com" target="_blank">lukeshu@lukeshu.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dan,<br>
<br>
I&#39;m sorry to bother you.<br>
<br>
In archweb commit bec4e79 (2013-02-09), you added<br>
`sitestatic/konami.min.js`.  It is apparently<br>
<a href="https://github.com/snaptortoise/konami-js" rel="noreferrer" target="_blank">https://github.com/<wbr>snaptortoise/konami-js</a> commit ec0f686 run through<br>
UglifyJS 2.2, but with a few modifications (below) made first.<br>
<br>
Would it be correct to assume that you are the author of those<br>
modifications?  If so, would you consent to re-licensing the<br>
modifications to be under the MIT license; reflecting the upstream<br>
license change in konami-js??<br>
<br>
---<br>
<br>
diff a/konami.js b/konami.js<br>
--- a/konami.js<br>
+++ b/konami.js<br>
@@ -56,7 +56,7 @@<br>
                        load: function(link){<br>
                                                                        this.orig_keys = this.keys;<br>
                                                                konami.addEvent(document,&quot;<wbr>touchmove&quot;,function(e){<br>
-                                 if(e.touches.length == 1 &amp;&amp; konami.iphone.capture==true){<br>
+                                 if(e.touches.length == 1 &amp;&amp; konami.iphone.capture===true){<br>
                                    var touch = e.touches[0];<br>
                                        konami.iphone.stop_x = touch.pageX;<br>
                                        konami.iphone.stop_y = touch.pageY;<br>
@@ -66,7 +66,7 @@<br>
                                        }<br>
                                        });<br>
                                konami.addEvent(document,&quot;<wbr>touchend&quot;,function(evt){<br>
-                                       if (konami.iphone.tap==true) konami.iphone.check_direction(<wbr>link);<br>
+                                       if (konami.iphone.tap===true) konami.iphone.check_direction(<wbr>link);<br>
                                        },false);<br>
                                konami.addEvent(document,&quot;<wbr>touchstart&quot;, function(evt){<br>
                                        konami.iphone.start_x = evt.changedTouches[0].pageX<br>
@@ -76,12 +76,12 @@<br>
                                        });<br>
                                        },<br>
                        check_direction: function(link){<br>
-                               x_magnitude = Math.abs(this.start_x-this.<wbr>stop_x)<br>
-                               y_magnitude = Math.abs(this.start_y-this.<wbr>stop_y)<br>
-                               x = ((this.start_x-this.stop_x) &lt; 0) ? &quot;RIGHT&quot; : &quot;LEFT&quot;;<br>
-                               y = ((this.start_y-this.stop_y) &lt; 0) ? &quot;DOWN&quot; : &quot;UP&quot;;<br>
-                               result = (x_magnitude &gt; y_magnitude) ? x : y;<br>
-                               result = (this.tap==true) ? &quot;TAP&quot; : result;<br>
+                               var x_magnitude = Math.abs(this.start_x-this.<wbr>stop_x)<br>
+                               var y_magnitude = Math.abs(this.start_y-this.<wbr>stop_y)<br>
+                               var x = ((this.start_x-this.stop_x) &lt; 0) ? &quot;RIGHT&quot; : &quot;LEFT&quot;;<br>
+                               var y = ((this.start_y-this.stop_y) &lt; 0) ? &quot;DOWN&quot; : &quot;UP&quot;;<br>
+                               var result = (x_magnitude &gt; y_magnitude) ? x : y;<br>
+                               result = (this.tap===true) ? &quot;TAP&quot; : result;<br>
<br>
                                if (result==this.keys[0]) this.keys = this.keys.slice(1,this.keys.<wbr>length)<br>
                                if (this.keys.length==0) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
Happy hacking,<br>
~ Luke Shumaker<br>
</font></span></blockquote></div><br></div>

Patch
diff mbox

diff a/konami.js b/konami.js
--- a/konami.js
+++ b/konami.js
@@ -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) {