PageMod/page-mod 和 Page/page-worker 之间有什么区别?

发布于 2025-01-04 21:16:34 字数 89 浏览 3 评论 0原文

我不明白其中的区别。我能看到的唯一区别是 PageMod 使用匹配模式,而 Page 使用特定的 URL。为什么不只使用 PageMod(更通用)来处理所有事情呢?

I don't understand the difference. The only difference I can see is that a PageMod uses a match pattern, whereas a Page uses a specific URL. Why not just use a PageMod (more versatile) for everything?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最美的太阳 2025-01-11 21:16:34

page-mod 模块适用于用户在浏览器中加载的页面。 page-worker 模块可让您在后台加载网页并使用它执行一些操作。例如,如果您想在用户访问所有 Google 搜索页面时添加“Super-Dooper-Search”按钮,则可以使用 page-mod。但是,如果您想在用户单击某个按钮时在后台加载 Google 搜索页面,从中提取搜索结果并将结果呈现给用户,那么您可以使用 page-worker - 而无需用户操作查看您加载的页面(仅作为示例,实际上不要这样做,因为它违反了 Google 的服务条款)。

The page-mod module works with pages that the user loads in the browser. The page-worker module lets you load a web page in the background and perform some operations with it. So you would for example use page-mod if you want to add a "Super-Dooper-Search" button to all Google Search pages when the user visits them. But you would use page-worker if you want to load the Google Search page in background when the user clicks some button, extract the search results from it and present the results to the user - without the user ever seeing the page you loaded (just as an example, don't actually do that because it violates Google's ToS).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文