clean-page.js 618 B

12345678910111213141516171819202122232425262728
  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.innerHTML = '#info, .three-inspector, button, input, body > div.lil-gui, body > div.lbl { display: none !important; }';
  8. document.querySelector( 'head' ).appendChild( style );
  9. /* Remove Stats.js */
  10. for ( const element of document.querySelectorAll( 'div' ) ) {
  11. if ( getComputedStyle( element ).zIndex === '10000' ) {
  12. element.remove();
  13. break;
  14. }
  15. }
  16. }() );
粤ICP备19079148号