npapi

Unable to pass integer from javascript to npapi plugin

纵然是瞬间 提交于 2019-12-02 03:58:15
I am writing a simple napapi plugin where I have to print the value passed from javascript function in html page. But I am facing problem while doing it. It works properly on firefox. But I want to do it on qt fancybrowser example. The value printed is always 0 no matter whatever value I pass in javascript code. The javascript code is as follows : <html> ..... <script> function process_data() { PluginObject = document.getElementById("Object"); var i =100; if(PluginObject){ ret = PluginObject.process_Data(i); } } </script> .... </html> The plugin code is as follows : ..... bool ScriptableObject

How to open a file which includes in Chrome extension by C/C++?

风流意气都作罢 提交于 2019-12-01 14:02:26
I'm trying to open a file to parse, say "config.txt", in my Chrome extension. By Javascript it will be fairly easy. For example: chrome.extension.getURL('config.txt') will get something like chrome-extension://kfcphocilcidmjolfgicbchdfjjlfkmh/config.txt . However, in the C++(or C) code of the extension, open a file by this kind of URL is not available. Is there any way to open a file in extension in this case? There are two ways you could address this; the first is to simply use javascript to get the path and then pass it into the plugin in a method call. The second is to get the path to the

Embedding NPAPI plugin in background using just Firefox Addon SDK

99封情书 提交于 2019-12-01 12:12:40
I have recently developed a NPAPI plugin (using FireBreath) in combination with a Google Chrome Extension. I am embedding the plugin using the background.html page and access it from multiple extension pages. Thus, the plugin remains loaded in the background page (until the extension is unloaded or the browser is closed). I am now searching for the easiest way to port this extension to Firefox. Using the Addon SDK and it's API, i can reproduce the communication between the addon code and HTML user interface. As there is no such global background DOM as in the Chrome Extension, how would I load

HTML on top of NPAPI plugin

六月ゝ 毕业季﹏ 提交于 2019-12-01 09:01:05
After I finished writing my browser plugin using FireBreath and OpenGL, and embedded the plugin using an object tag, I tried to overlay various HTML elements on top of the plugin. Unfortunately, the tag and plugin graphics always stayed on top of any other HTML element on the page, no matter what I tried. As far as I know, the flash plugin allows HTML overlays as follows: <param name="wmode" value="transparent"> Is there a general way to enable HTML overlays on or tags? If not, is there a way to enable overlays on NPAPI/ActiveX plugins, or does FireBreath somehow support this feature?

Has anyone got a simple step by step Mozilla plugin tutorial

痴心易碎 提交于 2019-12-01 07:31:26
I'm trying to create a Mozilla browser plugin for the sole purpose of detecting with javascript whether or not an application that I have written is installed. This was inspired by another stackoverflow question and answer on a similar subject. All I want really is a HelloWorld type example as what I need to write will be even simpler than that. There is a lot of information on the Mozilla website, but as a plugin noob and a C++ novice I'm experiencing information overload. I just need a step by step "this is how to create your first simple plugin". I have already written the IE equivalent by

HTML on top of NPAPI plugin

青春壹個敷衍的年華 提交于 2019-12-01 07:14:03
问题 After I finished writing my browser plugin using FireBreath and OpenGL, and embedded the plugin using an object tag, I tried to overlay various HTML elements on top of the plugin. Unfortunately, the tag and plugin graphics always stayed on top of any other HTML element on the page, no matter what I tried. As far as I know, the flash plugin allows HTML overlays as follows: <param name="wmode" value="transparent"> Is there a general way to enable HTML overlays on or tags? If not, is there a way

Detecting NPAPI support using JavaScript

南楼画角 提交于 2019-12-01 06:16:09
How can you detect if a browser supports NPAPI from JavaScript? Not all of them do, and whilst I could rely on the user-agent I'd much rather do it a more reliable way if one exists. Unfortunately, I can't simply detect if my plug-in has loaded or not, as it may be that the plugin simply isn't installed yet on a supported browser. Thanks. There is no JS API for this, but basically all desktop browsers except IE-/Trident-based ones and ChromeOS support NPAPI. You can find out wether your plugin is installed by checking navigator.plugins . If you want to check whether java plugins are enabled or

Has anyone got a simple step by step Mozilla plugin tutorial

僤鯓⒐⒋嵵緔 提交于 2019-12-01 05:15:11
问题 I'm trying to create a Mozilla browser plugin for the sole purpose of detecting with javascript whether or not an application that I have written is installed. This was inspired by another stackoverflow question and answer on a similar subject. All I want really is a HelloWorld type example as what I need to write will be even simpler than that. There is a lot of information on the Mozilla website, but as a plugin noob and a C++ novice I'm experiencing information overload. I just need a step

Detecting NPAPI support using JavaScript

允我心安 提交于 2019-12-01 05:07:03
问题 How can you detect if a browser supports NPAPI from JavaScript? Not all of them do, and whilst I could rely on the user-agent I'd much rather do it a more reliable way if one exists. Unfortunately, I can't simply detect if my plug-in has loaded or not, as it may be that the plugin simply isn't installed yet on a supported browser. Thanks. 回答1: There is no JS API for this, but basically all desktop browsers except IE-/Trident-based ones and ChromeOS support NPAPI. You can find out wether your

Alternatives to NPAPI plugins

纵饮孤独 提交于 2019-12-01 04:10:47
The NPAPI is being phased out by Chrome. What are the alternatives for writing NPAPI like browser plugins with cross browser support? I need to write a browser plugin which could talk to desktop based installed application. My environment is such that I have a desktop application and a web version of the same. The two need to communicate. My requirement is little more than just messaging. I need to first ascertain if the desktop application is installed. I do this by looking to windows registry for its installation information, if it is installed, I talk to the application and exchange