如何控制浏览器加载页面?
我想控制网络浏览器中加载的网页。 XUL 可用于满足此要求吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我想控制网络浏览器中加载的网页。 XUL 可用于满足此要求吗?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
任何允许注入 DOM 事件或脚本标签的东西都可以用来控制网页。 XUL 是一种用于描述 GUI 的语言,但对此没有什么用处。
以下是一些如何控制网页的示例。您没有提供有关您打算如何处理所述控件(浏览器扩展、后台脚本等)的任何详细信息,因此我将给出我能想到的所有情况的示例:
如果您想远程控制网络作为脚本的一部分独立于普通浏览器,您可以选择以下选项:
如果您想在现有浏览器中编写网页脚本(也许是为了隐藏广告或跳过您经常访问的页面上的导航屏幕),您可以选择以下选项:
Anything which allows you to inject DOM events or script tags can be used to control a web page. XUL is a language for describing GUIs and isn't useful for that.
Here are some examples of how you can control a webpage. You didn't provide any details as to what you intend to do with said control (Browser extension, background scripting, etc.), so I'll give examples for all cases I can think of:
If you want to remote-control web pages as part of a script independent from your normal browser, here are your options:
<script>
tags to control the page. This answer (also mine) has a list of web widgets for various Python toolkits and most (probably all) of them are available for other languages as well. You'll also want to read the instructions for writing userscripts.If you want to script a webpage inside your existing browser (perhaps to hide ads or skip nag screens on pages you visit frequently), here are your options: