clean-page.js 822 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * @author munrocket / https://github.com/munrocket
  3. */
  4. ( function () {
  5. /* Start VR pages */
  6. let button = document.getElementById( 'startButton' );
  7. if ( button ) {
  8. button.click();
  9. }
  10. /* Remove dat.gui and fonts */
  11. let style = document.createElement( 'style' );
  12. style.type = 'text/css';
  13. style.innerHTML = `body { font size: 0 !important; }
  14. #info, button, input, body > div.dg.ac, body > div.lbl { display: none !important; }`;
  15. let head = document.getElementsByTagName( 'head' );
  16. if ( head.length > 0 ) {
  17. head[ 0 ].appendChild( style );
  18. }
  19. /* Remove stats.js */
  20. let canvas = document.getElementsByTagName( 'canvas' );
  21. for ( let i = 0; i < canvas.length; ++ i ) {
  22. if ( canvas[ i ].height === 48 ) {
  23. canvas[ i ].style.display = 'none';
  24. }
  25. }
  26. }() );