简单的 Opera 插件
如何编写一个简单的 Opera 插件?
我想开发一个插件,可以根据请求的 url 数据更改请求的 Referer
标头。
Opera 的网站称插件应使用 Netscape4 Plug-in API 进行开发。然而,关于它的信息并不多。我在我的 c:/program files/opera/program/plugins
中查找,似乎 Opera 的插件是 .dll
。 Opera 插件开发应该使用什么编程语言?您知道有关它的任何演练吗?
How to write a simple Opera plugin?
I'd like to develop a plugin that would change the Referer
header of a request based on request's url data.
Opera's website says plugins should be developed using Netscape4 Plug-in API. However there's not so much information about it available. I looked up in my c:/program files/opera/program/plugins
and it seems like Opera's plugins are .dll
s. What programming language should be used for Opera Plugin Development and do you know of any walk-through about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只想修改 HTTP 请求,那么编写一个代理服务器来执行此操作可能是最简单的(例如破解 Squid 并配置 Opera 使用它)。
Opera 的插件仅用于处理特定媒体类型,例如 Flash 或 Quick Time 视频,并且只能通过
Opera 还有另一种扩展机制 - UserJS - 这是在每个页面上运行的 JavaScript(类似于 Firefox 中的 Greasemonkey)。您可以使用它来修改 JavaScript 中的
document.referrer
,但不能在 HTTP 标头中修改。If you only want to modify HTTP requests, it may be easiest to write a proxy server that does that (e.g. hack Squid and configure Opera to use it).
Opera's plugins are only for handling specific media types, e.g. Flash or Quick Time videos and are invoked only via
<object>
,<embed>
or opening of specific file. They're not general-purpose plugins.Opera has another extension mechanism - UserJS - which is JavaScript ran on every page (similar to Greasemonkey in Firefox). You could use it to modify
document.referrer
in JavaScript, but not in HTTP headers.