Skip to content

浏览器保留标签页,重新打开不会加载脚本 #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AzureBlue0219 opened this issue Jan 16, 2023 · 6 comments
Open

浏览器保留标签页,重新打开不会加载脚本 #135

AzureBlue0219 opened this issue Jan 16, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@AzureBlue0219
Copy link

浏览器设置保留标签页时,下一次打开不会加载脚本
网页捕获_16-1-2023_20041_settings
2023-01-16_163449
希望可以像Tampermonkey一样直接加载脚本
2023-01-16_163607
是浏览器关闭后下一次打开的同样脚本,同样网站的截图。

@CodFrm CodFrm added the bug Something isn't working label Jan 17, 2023
@CodFrm
Copy link
Member

CodFrm commented Jan 17, 2023

这个功能没用过,是锦集么?

@AzureBlue0219
Copy link
Author

AzureBlue0219 commented Jan 17, 2023

这个功能没用过,是锦集么?
网页捕获_18-1-2023_94737_settings

是Bilibili Evolved的自定义顶栏,除了这个其他的脚本也不运行,比如记录历史记录的脚本
网页捕获_17-1-2023_103234_www bilibili com
网页捕获_17-1-2023_103135_www bilibili com
这两个都是直接显示的脚本,都没有显示,所以我认为脚本没有加载,其他的脚本我并没有测试

@CodFrm
Copy link
Member

CodFrm commented May 21, 2023

这个问题有点难解决了,初次启动时,content比我的background会快,导致脚本还没加载完成,页面就加载完成了

先留在这里吧,以后看看有什么其他方法

CodFrm added a commit that referenced this issue May 21, 2023
@CodFrm
Copy link
Member

CodFrm commented May 21, 2023

解决这个问题需要修改脚本加载方式,现在是由content发送消息给background,然后background再注入脚本。

可能需要修改成background监听页面的加载,但是也不确定能不能解决这个问题。另外改动较大,怕修改出其他问题,留到后续再处理吧

@KnIfER
Copy link

KnIfER commented Jul 16, 2024

首次启动需要主动注入所有页面吧

@CodFrm
Copy link
Member

CodFrm commented Jul 16, 2024

@KnIfER 是的,但是页面打开了,扩展还没加载完成,就出现了这种情况

而且首次启动,主动注入所有页面也不合适,有的脚本需要更快的运行,这种就不好处理了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants