加载特定网站时自动运行JavaScript代码 [英] Automatically run JavaScript code upon loading a specific website

查看:125
本文介绍了加载特定网站时自动运行JavaScript代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了脚本来过滤作者编程论坛中的主题和帖子。

I've written scripts to filter out threads and posts in a programming forum by author.

但您需要将代码分别发布到每个页面的Web控制台中。

But you need to post the code into the web console for each page individually.

我想知道是否有可能,如果是这样(使用firefox或chrome),设置浏览器以在加载特定网站时运行特定脚本?是否可以作为扩展名或插件?

I was wondering if it were possible and if so how (using either firefox or chrome), to set your browser up to run a specific script upon loading a specific site? Is it possible as an extension or plugin?

推荐答案

您可以使用 Tampermonkey for Google Chrome

You can use Tampermonkey for Google Chrome


Tampermonkey是最多的谷歌浏览器的热门用户经理。

Tampermonkey is the most popular userscript manager for Google Chrome.

Greasemonkey


允许您自定义网络的方式页面显示或行为,使用一小部分JavaScript。

Allows you to customize the way a web page displays or behaves, by using small bits of JavaScript.

这篇关于加载特定网站时自动运行JavaScript代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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