Skip to content

Commit ae734da

Browse files
committed
limited clicks to mouse button 0 to prevent double clicks
1 parent 59651f3 commit ae734da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

repo.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ function repo_init(){
103103
'mousedown': {
104104
'preventDefault': true,
105105
'todo': function(){
106-
if(time <= 0){
106+
if(!core_mouse['down-0']
107+
|| core_mouse['down-2']
108+
|| time <= 0){
107109
return;
108110
}
109111

@@ -112,7 +114,7 @@ function repo_init(){
112114
1, 1
113115
).data[0];
114116
if(pixel === 0){
115-
return;
117+
return;
116118
}
117119

118120
score += pixel === 102

0 commit comments

Comments
 (0)