Code Monkey home page Code Monkey logo

Comments (9)

Mishasama avatar Mishasama commented on August 30, 2024

image
将运行时期设置为idle可缓解症状,避免问题100%复现。

from blth.

andywang425 avatar andywang425 commented on August 30, 2024

我估计是因为BLTH hook了xmlHttpRequest和fetch。而且运行时期太晚hook就没用了,所以脚本不得不在document-start阶段运行。之后会想想办法。

from blth.

u2shana avatar u2shana commented on August 30, 2024

现在还有个问题,在未开播直播间也不显示面板按钮,但是控制台有运行日志的

from blth.

Mishasama avatar Mishasama commented on August 30, 2024

脚本不得不在document-start阶段运行。

也许可以考虑把一些不必要start的功能分开?避免整个脚本都失效。

现在还有个问题,在未开播直播间也不显示面板按钮,但是控制台有运行日志的

image
在龟速网络下会接近100%复现。建议为此功能增加轮询重试。

from blth.

andywang425 avatar andywang425 commented on August 30, 2024

也许可以考虑把一些不必要start的功能分开?避免整个脚本都失效。

再做一个脚本?这还是算了吧,真没那么多精力。

现在还有个问题,在未开播直播间也不显示面板按钮,但是控制台有运行日志的
在龟速网络下会接近100%复现。建议为此功能增加轮询重试。

其实已经有轮询重试了,还报错大概是因为是超时时间太短了(3秒),之后我可以调整一下参数,或者用MutationObserver监听的方式来取代轮询。

from blth.

Mishasama avatar Mishasama commented on August 30, 2024

再做一个脚本?这还是算了吧,真没那么多精力。

当然不是……只是将一些无须start的功能加个等待,以达到部分document-idle的效果。这样也许还能提高性能表现。

已经有轮询重试

那不可能啊……只要页面完全加载完毕了,你再次轮询的话就不应该会有问题。但事实上页面加载完了它也没有继续尝试了,在控制台也只看到一条超时报错,并没有轮询的迹象。

from blth.

andywang425 avatar andywang425 commented on August 30, 2024

当然不是……只是将一些无须start的功能加个等待,以达到部分document-idle的效果。这样也许还能提高性能表现。

懂了。脚本现在内部有一套模块的运行时机管理机制,每个模块有自己的运行时机,模块会等到自己的运行时机再运行。要提高和别的脚本的兼容性的话我觉得还是得在hook方面下手,尽量减少副作用。

那不可能啊……只要页面完全加载完毕了,你再次轮询的话就不应该会有问题。但事实上页面加载完了它也没有继续尝试了,在控制台也只看到一条超时报错,并没有轮询的迹象。

看控制台确实是看不出来的,我估计还是超时时间太短。下个版本中我用监听取代了轮询,超时时间延长到了10秒,到时候你再试试。

from blth.

andywang425 avatar andywang425 commented on August 30, 2024

刚刚更新了7.1.5

from blth.

Mishasama avatar Mishasama commented on August 30, 2024

情况好点了,但是偶尔还是有这种情况。(B站的廉租CDN问题多多)
image
🙂

但是 Chrome 在 PB 的干扰下还是稳定的全模块出错

image

🙃

from blth.

Related Issues (20)

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.