我编写了脚本来过滤作者在编程论坛中的主题和帖子。
但是您需要将每个页面的代码分别发布到 Web 控制台。
我想知道是否有可能以及如何(使用 firefox 或 chrome)将浏览器设置为在加载特定站点时运行特定脚本?是否可以作为扩展或插件?
最佳答案
您可以使用 Tampermonkey适用于谷歌浏览器
Tampermonkey is the most popular userscript manager for Google Chrome.
Greasemonkey对于 Firefox:
Allows you to customize the way a web page displays or behaves, by using small bits of JavaScript.
关于javascript - 加载特定网站时自动运行 JavaScript 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22707808/