开发者

Simple Opera plugin

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 开发者_Python百科looked up in my c:/program files/opera/program/plugins and it seems like Opera's plugins are .dlls. What programming language should be used for Opera Plugin Development and do you know of any walk-through about it?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜