clean-page.js 626 B

1234567891011121314151617181920212223242526272829
  1. ( function () {
  2. /* Remove start screen (or press some button ) */
  3. const button = document.getElementById( 'startButton' );
  4. if ( button ) button.click();
  5. /* Remove gui and fonts */
  6. const style = document.createElement( 'style' );
  7. style.type = 'text/css';
  8. style.innerHTML = '#info, button, input, body > div.lil-gui, body > div.lbl { display: none !important; }';
  9. document.querySelector( 'head' ).appendChild( style );
  10. /* Remove Stats.js */
  11. for ( const element of document.querySelectorAll( 'div' ) ) {
  12. if ( getComputedStyle( element ).zIndex === '10000' ) {
  13. element.remove();
  14. break;
  15. }
  16. }
  17. }() );