dao3.fun使用优化

dao3.fun部分功能修改及优化

// ==UserScript==
// @name         dao3.fun使用优化
// @version      0.0.4.230706
// @namespace    https://greasyfork.org/zh-CN/users/942818-async-function
// @match        https://dao3.fun/*
// @require      https://cdn.jsdelivr.net/npm/three@0.142.0/examples/js/libs/stats.min.js
// @grant        none
// @author       _async_function_
// @description  dao3.fun部分功能修改及优化
// @icon         https://dao3.fun/pwa/box3/android-icon-192x192.png
// @license      GPL-3.0-only
// @compatible   edge
// @compatible   chrome
// ==/UserScript==

var stats = new Stats();
document.body.append(stats.domElement);


setTimeout(() => {
  function update() {
      requestAnimationFrame(update);
      stats.update();
  }
  update();
  if (!window.location.href.includes('/edit/') && !window.location.href.includes('/play/')) return;
  setInterval(() => {
    for (let i=0;i<100;i++) {
      try{
        document.querySelector(`body > div:nth-child(${i})`)
          .removeChild(document.querySelector(`body > div:nth-child(${i}) > div.fixed.w-screen.h-screen.bg-black.bg-opacity-40.top-0.left-0.bg-opacity-0.z-modal`));
        alert('已成功移除');
      }catch(e) {
        console.log(e);
      }
    }
  }, 15000);
});