开发者

Is there a way to run external program in a opera widget or extension? And about its encoding problem in Linux

开发者 https://www.devze.com 2023-01-31 15:04 出处:网络
I\'m working on an extension which must be able to call a external program. In firefox, nsIProcess can be used and it\'s very easy.

I'm working on an extension which must be able to call a external program.

In firefox, nsIProcess can be used and it's very easy.

But opera's UserJS or widget seems very weak and have no such function.

Is there some working around?

Another question, I tried to use protocols handlers.

It's just weird, and strange problems show up.

  1. When the URL passed to the protocol handler has UTF-8 character like %AE in it,

    whether escape() it or not, the handler cannot receive the correct URL.

    I have to replace % with some strange strings to avoid this. It's really a ugly solution.

    It only appears in Linux, opera 11.0.

    I'm s开发者_StackOverflow中文版tarting to think it's a bug.

  2. In Opera Linux, it will replace all the backslash in URL with '/'. I don't want this, how to disable it?


Regarding the second part of your question, have you tried using the encodeURI() function for escaping your URLs?

0

精彩评论

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