最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Google Chrome console run a command in every page of a particular website - Stack Overflow

programmeradmin7浏览0评论

I am visiting a website which I think has a bug. And I have tried running a javascript function (defined by them), after running the function the site works smoothly in that page. After I navigate to a different page, I again have to run the function. So I want it to run automatically after the page loads. I am using google chrome. So, are there any chrome extensions or any built in thing that can do this. Any help will be appreciated. Thanks in advance.

I am visiting a website which I think has a bug. And I have tried running a javascript function (defined by them), after running the function the site works smoothly in that page. After I navigate to a different page, I again have to run the function. So I want it to run automatically after the page loads. I am using google chrome. So, are there any chrome extensions or any built in thing that can do this. Any help will be appreciated. Thanks in advance.

Share Improve this question asked Sep 6, 2014 at 7:03 Anay KarnikAnay Karnik 9401 gold badge7 silver badges15 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

I think tampermonkey is what you are looking for https://chrome.google./webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo

Another solution is to write an extension that injects code in the page's context.

It's important, because normally code in the extension is isolated from the page.

Tampermonkey route is probably better though in your case.

发布评论

评论列表(0)

  1. 暂无评论