Chrome plugin removal - google-chrome

I'm writing an NPAPI plugin. In every webpage that the browser goes to, I inject my plugin with an object tag. Something like:
<object id="myplugin" type="plugin-mime-type" >
In some pages where i dont want it, after injection i remove it by finding the element using the id and doing a document.removeChild. From my logging i found that in firefox and opera, doing this automatically calls the plugin destroy method NPP_Destroy (NPAPI). But in chrome, it doesnt seem to call it. Is there any special way that i should remove a plugin in chrome that i am missing??
Any help would be appreciated.
Thanks

Solved the issue by putting the object into a div and setting the div's display to none while removing. That killed the plugin process.

Related

Firebug Failed to load given url

Images are loaded on my html pages. But Firebug shows that it failed to load given url when I hover on the element on firebug panel.
That's obviously a bug in Firebug 2.x. I only found the related issue #3540, so you might want to file a new issue for it.
Having said that, Firebug as extension is going away with one of the upcoming versions of Firefox. It is implemented as theme for the Firefox DevTools instead, which don't have this issue. So, I suggest to use those instead.

Chrome Plugin: pop-up alert when some web elements changed after refreshing

There are some available plugins already for chrome that can act as an auto page refresher. However if I want to check if some specific elements in the website have changed or not (e.g. an element inside a table) after refreshing, is there any available plugin that can act like that (or Firefox plugin)? Or is there any way to learn how to develop such plugin? Thanks a lot.
p.s. no experience developing chrome plugin, little bit knowledge in C++ and Java

Audio doesn't play in Opera, at all, and is this a common issue?

I'm trying to play an mp3 in opera. It doesn't work. It's just an mp3, no code or anything. I get this error "the procedure entry point libvlc_video_set_format_callbacks could not be lovated in the dynamic link library libvlc.dll"
I'm afraid that this might be normal for Opera (I just installed it), so I'd like to figure out what the problem is and if there's any way in HTML to get around this problem. At the very least, I'd like to have a popup or other notification that let's the user know how to solve the problem (maybe download a plugin or something similar).

Masking a plugin (or applet) to show html content over it in Chrome on the Mac

For all other browsers that I've tried in both Windows and MacOSX (including Chrome under Windows) using an "iframe shim" works fine. However, I have not been able to get iframe shims to work over our plugin in Chrome on the Mac.
Having Googled the problem, and done some testing, it appears to depend upon the object. I've found an example using StreetView (a flash object) which works, and another example using a Java Applet which does not work.
Some links:
Here's a description of the method: http://www.oratransplant.nl/2007/10/26/using-iframe-shim-to-partly-cover-a-java-applet/
This example using a Java Applet is from the above article: http://www.oratransplant.nl/files/iframe_shim.html
And here's the working version using Streetview: http://gmaps-samples.googlecode.com/svn/trunk/streetview/iframeshim.html
By inspecting (and editing) elements in Chrome and copying the objects between the two example pages, it appears to be that the flash object just allows iframe shims (in Chrome on the Mac), but that the Java Applet does not.
In our case we are using a custom plugin, built with Firebreath.
It may be that I need to implement extra functionality into our plugin, mimicking whatever flash is doing, but this could well be caused by a bug in the Mac build of Chrome.
Can anyone help? We really do want to be able to show HTML elements over our plugin, and the iframe shim works on almost all browser/OS combinations!
The lack of compositing is a known bug in Mac Chrome with any plugin using Core Animation or Invalidating Core Animation. It will be resolved in some future version--in theory, you should never need an iframe hack on the Mac, and plugins should always composite correctly. If you are interested, you can detect whether compositing of Core Animation is supported dynamically in your plugin using NPN_GetValue with the value 74656 (see WKNVSupportsCompositingCoreAnimationPluginsBool in the WebKit source; this should be added to the formal NPAPI spec soon, but the value won't change, so you can hard-code it now and when Chrome supports it that will start returning true).
In general the iframe hack should work in recent versions of Chrome (what version are you testing?), but there are some bugs where it doesn't get noticed until the page gets a re-layout, so you might want to play with forcing that.
Note that your Streetview example isn't a valid test on Mac Chrome, because it's using wmode=opaque, which means it's using the CG mode, not CA mode, and thus compositing works completely regardless of the iframe hack.
What drawing method are you using? You shouldn't need to use an iframe over a plugin on Mac because all drawing is windowless, unless you're doing strange things that I wouldn't expect to be possible with Chrome (i.e. creating an opengl context over a coregraphics or quickdraw context). If you were doing something like that there would probably not be anything you could do.
One easy setting would be to just resize the plugin to 1x1 to effectively "hide" it.

Anyone tried Youtube API iframe on IE9?

I'm trying to use the sample code on this page. I copy paste it into an html file and try to open it using IE9 and FF but nothing shows up. Any idea what I might be missing?
http://code.google.com/apis/youtube/iframe_api_reference.html#Getting_Started
One thing that can help is making sure your page is rendered in standards mode by declaring it as <!doctype html>. However, that does not seem to fix all circumstances where the embed fails to load. (For example, it also doesn't like to load if the containing element isn't displayed.)
Works for me only after deleting browser history.
So I'm guessing it may have something to do with resource de-allocation of some sort (although, I would expect the IE's Javascript interpreter to do it).