Skip to content

Commit 6b0a67c

Browse files
committed
Clean up.
1 parent af9bfe1 commit 6b0a67c

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

docs/index.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,10 @@ <h1><a href="http://threejs.org">three.js</a> / docs</h1>
9393
link.setAttribute( 'target', 'viewer' );
9494
link.addEventListener( 'click', function ( event ) {
9595

96-
if ( event.button === 0 && !event.ctrlKey && !event.altKey && !event.metaKey ) {
96+
if ( event.button !== 0 || event.ctrlKey || event.altKey || event.metaKey ) return;
9797

98-
window.location.hash = pageURL;
99-
panel.classList.add( 'collapsed' );
100-
101-
}
98+
window.location.hash = pageURL;
99+
panel.classList.add( 'collapsed' );
102100

103101
} );
104102

examples/index.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,9 @@ <h1><a href="http://threejs.org">three.js</a> / examples</h1>
296296
link.setAttribute( 'target', 'viewer' );
297297
link.addEventListener( 'click', function ( event ) {
298298

299-
if ( event.button === 0 && !event.ctrlKey && !event.altKey && !event.metaKey ) {
299+
if ( event.button !== 0 || event.ctrlKey || event.altKey || event.metaKey ) return;
300300

301-
selectFile( file );
302-
303-
}
301+
selectFile( file );
304302

305303
} );
306304

0 commit comments

Comments
 (0)