Chrome扩展程序:使其每页加载运行 [英] Chrome Extension: Make it run every page load

查看:103
本文介绍了Chrome扩展程序:使其每页加载运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在一个页面加载完成后执行一些脚本的chrome扩展,我不确定是否必须在后台页面上实现这个逻辑,或者它可以在其他任何地方,这里的任何帮助将不胜感激。如果它需要在页面的 onload 事件上运行,那么可以使用

解决方案 ,这意味着文档及其所有资源都已加载,这需要位于每个页面中嵌入的内容脚本中你希望跟踪 onload


I want to make a chrome extension that executes some scripts after one page is loaded, I am not sure whether I have to implement this logic on the background page or it can be anywhere else, any help here will be greatly appreciated.

解决方案

If it needs to run on the onload event of the page, meaning that the document and all its assets have loaded, this needs to be in a content script embedded in each page for which you wish to track onload.

这篇关于Chrome扩展程序:使其每页加载运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆