Load firebreath plugin in Firefox extension without injecting anything in DOM - plugins

Is there any way to load firebreath plugin in firefox extension.I've seen one way by injecting html related to plugin into DOM as explain here(see "http://stackoverflow.com/questions/5688904/scriptable-npapi-plugin-doesnt-work-with-firefox")
I think its better that extension will load plugin in background to avoid any security issues.
my plugin has nothing to do with drawing, its just send data to a specific port by calling a simple function.I'm new to extension development so any example will be helpful...

Sounds like you figured it out, but for the sake of any who find this question with the same issue: a NPAPI-based plugin (FireBreath or otherwise) can only be loaded inside of a DOM; however, in the case of a firefox extension (or Chrome extension for that matter) it doesn't have to neccesarily be the DOM of the web page, it could also be the DOM of the extension.
In this case, you can load the plugin in the XUL file.
It's also worth checking out this thread:
Using a plugin generated with Firebreath in a Firefox Extension?

Related

how to put chrome devtool in browser?

I'm working for a project which run by chrome headless driver puppeteer, And i recently found a website (https://chrome.browserless.io/) could show puppeteer process in browser. This website appended an chrome devtoll which looks like magic.
i try to figure out how did work, and i found that this website inject a chrome devtool iframe, and the url usually like below:
https://chrome-devtools-frontend.appspot.com/serve_file/#7f3cdc3f76faecc6425814688e3b2b71bf1630a4/inspector.html?wss=chrome.browserless.io/devtools/page/(4BDC5841A823B95BF9B6107801819A31)&remoteFrontend=true
i think the version after inspector.html refer for the puppeteer code, but i don't know how this work.
i think this is some method imply over DevTools Protocol. I search the document but found nothing about how to put chrome devtool iframe in browser.
Does anyone know how to do this? or any document about this?
The Browserless Chrome Debugger you mentioned in your question has an instance of CodeMirror text editor embedded in the left hand section.
In the right hand section, an iframe element exists to display the result of the code you executed.
Simply put, you can simulate this type of behavior and allow users to execute Puppeteer code directly from your website by following a series of steps:
Sandbox a section of your system with a system container manager, such as LXD.
Install Node.js, NPM, and Puppeteer.
Install a web-based code editor, like CodeMirror, and embed it into a web page.
Validate and send an AJAX request with the code from the text editor to your sandbox server.
Sanitize the code, and then pass the code to Puppeteer.
Return the result to your callback function in your AJAX request on the client-side.
Format and sanitize the result before displaying it in an iframe.
Note: This is a naive implantation of this concept intended to explain the bare necessities of what would be required to obtain the goal in the question.
Make sure that you follow all generally recommended security practices.

Cannot get JxBrowser to render in eclipse rcp JavaFx environment

I am currently evaluating JxBrowser 6.17 as an alternative browser technology for a eclipse RCP based data maintenance application, since the SWT Browser does not suit our needs.
What are our special needs anyways? Well, we need to embed an older solution into our new application, since we would not be able to add all required features into the new application in time. Since we have the required features in an older JSP based web application we need to embed it to make the functionality available to our customers. This comes with a lot of issues, but for most of them we already generated answers. The biggest issue we are currently facing is that the SWT Browser component does not support instance based Cookies which we need, since our web application has Cookie based session management.
I have also tried using the Mozilla implementation using different profiles, which unfortunately is not possible, since the profile management is just as static as the Cookie management.
Next step is to evaluate commercial frameworks with which I am currently facing some issues.
I requested an evaluation license for JxBrowser and tried to embed it into our eclipse 4 RCP application. I would like to embed it using JavaFX, since we already use JavaFX and would like to avoid AWT.
Using the following code will instantiate a JxBrowser and load the given URL. Actually the request does get fired, but the Browser does not render any content at all.
FXCanvas canvas = new FXCanvas(parent, SWT.NONE);
Browser browser = new Browser();
BrowserView browserView = new BrowserView(browser);
browser.loadURL("http://www.google.com");
canvas.setScene(new Scene(browserView));
Even when loading specific HTML it will not render any content.
There are no observable Exceptions or errors.
Does anybody have an idea on whats the issue in my case?
In a different scenario we use the JavaFX WebView embedding the CKEditor into our application and everything works (more or less) flawlessly, but I am not able to get the JxBrowser to render its contents.
I am sure, that I am doing something wrong (probably something pretty basic :))
What could I be missing?
Any idea or tip could do the trick ;)

SWFObject like setup for Unity

Is there a SWFObject type setup for embedding Unity content and having a fallback HTML content (with a link to install the plugin)?
The JS included with Unity only allows for a button they've created.
Here's the official guide
Basically, for non-IE browsers, you check that the plugin's installed using javascript, and for IE, you use VisualBasic scripting. Their code isn't terribly pretty (all those document.write calls - ugh!) but it's robust.
You can always take their code, clean it up and wrap it in a nicer package. I know I did (but for a client, so I can't give you the code - sorry)

Using Joomla 1.5 based site, I am experiencing a problem while making JAPopup plugin work with Template 29042 from template-help.com

JAPopup is a handy plugin for Joomla to render Youtube videos in a Modal Window so user cannot click on multiple Youtube videos at the same time. The website URL is www.multicorewareinc.com/29042 (hast not gone live yet!). If I use a standard Joomla template such as JA_Parity or rhuk_mllkyway, JAPopup plugin works fine. But instead if I use Template 29042 from template-help.com, JAPopup hangs up. I compared the index.php files of a working template (such as rhuk_milkyway) and Template 29042 and as far as I can tell, 29042 uses Javascript extensively and there appears to be an issue when it comes to launching JAPopup (which too is based on Javascript). I put print statements in all the JAPopup modules and verified that the code was getting executed in either templates. So I am at a loss as to why JAPopup won't execute. If anyone has a suggestion, I would be grateful. Once I fix this, I plan on publishing the problem and the fix on my web-site, www.sreeiyer.com.
What does Firebug say? It's obviously a jscript conflict so start narrowing down the options - does the template use jQuery or another library? Does JAPopup use a library? You can also remove the scripting from the template and start adding it back until the error comes back, then you know what needs to be rewritten.

Import/include another XUL file in XUL

I am writting an Firefox add-on in XUL and I want to include another XUL file within my browser.xul. In PHP I would use something like this: include("anotherFIle.php"); but I don't know the equivalent in XUL.
What is the best way to accomplish this?
XUL has an iframe similar to the HTML iframe. However, if you are just trying to add in some UI elements into the pre-existing UI, then look at overlays.
Raw file-includes ala PHP cannot be done in a lot of other languages. XUL is/isn't a imperative programming language so much as a markup language -- and includes just ain't gonnna fly.
You can use an iframe to include another html page, but I don't believe you can include local files, or other XUL.
See Using Remote XUL where you'll get this handy tip:
Support for remote XUL has long been a potential security concern; support
for it was removed in Gecko 2.0. This
also means you can't load XUL using
file:// URLs.
XUL tutorial: content panels suggests that you can include XUL via iframe, but I don't see any working example.