XMOJ-Script-dev/XMOJ-Script

[Bug] if dark mode is enabled, the page flashes when loading

Opened this issue · 22 comments

检查项

  • 我已确认了XMOJ增强脚本已为最新版,且最新版未修复这个 Bug 。
  • 我已在 Issues 页面 中搜索,确认了这一 Bug 未被提交过。

描述

This is because xmoj's version of bootstrap still loads.
In fact, this can be fixed by blocking (https://www.xmoj.tech/template/bs3/bootstrap.min.js) in devtools

重现步骤

No response

控制台错误信息

No response

So, I am not sure if this is possible with a userscript, but extensions are allowed to block content

确实

so, we could fork tampermonkey...

但是这需要让脚本在也面前加载才能改正

so, we could fork tampermonkey...

你在想什么呢,难道要求所有用户重装插件?

so, we could fork tampermonkey...

and add a feature that blocks pages

is tampermonkey even open source...

tampermonkey是开源的

不对,他妈不是开源的

Did you write a script to reopen stale issues...

@boomzero No, manual

Did you write a script to reopen stale issues...

@boomzero No, manual

good job!

solution: block xmoj's bootstap

如果你要这样做的话,必须要在加载页面之前就执行用户脚本。GM有这个功能,但是如果你这样做,就要涉及到很多代码的重写

@boomzero @ptsq-bot @langningchen
我明天和高老师沟通一下,看能不能给小明OJ本身加一个暗色模式

你线下还是线上

My solution is to add https://www.xmoj.tech/template/bs3/bootstrap.min.js to my adblocker