Giter VIP home page Giter VIP logo

egret-inspector-install's Introduction

Egret 白鹭开发Chrome插件(修复版)

更新:20210113更新

亲测Chrome 87.0.4280.141(正式版本)有效

控制台偶尔会报错 Uncaught TypeError: this.addChild is not a function 。 这插件依赖页面中的 Egret 引擎,当它在加载时,游戏页面中的 Egret 引擎可能还未完全加载,所以调用 this.addChild 方法导致报错。

inspector error

解决 this.addChild is not a function 报错

EgretInspector-install 目录中的 contentScripts.min.js 文件,将压缩后的代码进行格式化还原。再将还原后的 313 - 320 行代码进行替换,原代码:

if (EGRETRELEASE) {
  n = ["injectScripts.min.js"];
}
e.addScript(n);
window.setTimeout(function() {
  t.startInspectIfDevToolOpen();
}, 200);

修改为:

   if (EGRETRELEASE) {
      n = ["injectScripts.min.js"];
    }
    
  window.setTimeout(function() {
    e.addScript(n);
    t.startInspectIfDevToolOpen();
  }, 200);

直接使用

git clone https://github.com/jsl6/EgretInspector-install.git

打开chrome 扩展程序,开发模式下,加载已解压的扩展程序 extend

选择前面EgretInspector-install即可。 这时打开Egret运行页面,插件不会报错。 EgretInspector

亲测Chrome 87.0.4280.141(正式版本)有效 - 20210113更新。
修改基于:EgretInspector-v2.5.5。

egret-inspector-install's People

Contributors

zhao-core avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.