gpt4 book ai didi

google-chrome-extension - 即使 chrome 关闭也能运行的 Chrome 扩展

转载 作者:行者123 更新时间:2023-12-03 04:54:14 25 4
gpt4 key购买 nike

我有一个 chrome 扩展,当 chrome 打开时运行良好。问题出在 chrome 应用程序关闭时。我需要使扩展程序始终运行 - 无论 chrome 浏览器打开还是关闭。有什么方法可以让扩展程序即使在 chrome 关闭时也能运行吗?

最佳答案

这正是 background permission 的内容是:

Makes Chrome start up early and and shut down late, so that apps and extensions can have a longer life.

When any installed hosted app, packaged app, or extension has "background" permission, Chrome runs (invisibly) as soon as the user logs into their computer—before the user launches Chrome. The "background" permission also makes Chrome continue running (even after its last window is closed) until the user explicitly quits Chrome.

只需将“background”添加到扩展程序的manifest.json中列出的权限中,它就会在Chrome打开之前和Chrome关闭之后继续运行。

关于google-chrome-extension - 即使 chrome 关闭也能运行的 Chrome 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35587174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com