Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jul 25, 2018
1 parent af9bfe1 commit 6b0a67c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@ <h1><a href="http://threejs.org">three.js</a> / docs</h1>
link.setAttribute( 'target', 'viewer' );
link.addEventListener( 'click', function ( event ) {

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

window.location.hash = pageURL;
panel.classList.add( 'collapsed' );

}
window.location.hash = pageURL;
panel.classList.add( 'collapsed' );

} );

Expand Down
6 changes: 2 additions & 4 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,9 @@ <h1><a href="http://threejs.org">three.js</a> / examples</h1>
link.setAttribute( 'target', 'viewer' );
link.addEventListener( 'click', function ( event ) {

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

selectFile( file );

}
selectFile( file );

} );

Expand Down

0 comments on commit 6b0a67c

Please sign in to comment.