Skip to content

Commit

Permalink
Make it possible to hide title, for embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancarter committed Jul 2, 2020
1 parent 3e0ae70 commit 40b6aa8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions anim.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,12 @@ window.addEventListener( 'load', function () {
main = document.createElement( 'div' );
main.style.position = 'relative';
document.body.appendChild( main );
const params = new URLSearchParams( window.location.search );
if ( params.get( 'hide-title' ) ) {
const headers = document.body.getElementsByTagName( 'H1' );
for ( var i = 0 ; i < headers.length ; i++ ) {
headers[i].style.display = 'none';
}
}
} );

0 comments on commit 40b6aa8

Please sign in to comment.