Skip to content

Commit

Permalink
Improved gallery button behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Oct 19, 2021
1 parent a3ee286 commit 7da7750
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,14 @@

var button = document.createElement( 'a' );
button.style.marginRight = '0px';
button.textContent = 'gallery';

if ( document.referrer.startsWith( 'https://glslsandbox.com/' ) ) {

button.textContent = 'back';
button.href = document.referrer;
button.href = 'javascript:window.history.go( -1 )';

} else {

button.textContent = 'gallery';
button.href = '/';

}
Expand Down

0 comments on commit 7da7750

Please sign in to comment.