Detect if own Opera extension installed and disabled using JavaScript - opera-extension

I can detect if my Opera extension installed by setting the new window object property (window.isExtensionInstalled for example) in injected script and checking it in web-page javaScript.
But this is not solution in case the extension is disabled.
How can I detect disabled extension?
Are there features like resources web-access in same manner as for Chrome extensions?
May be some other useful features?
Thanks in advance.

No, there is no such feature.
By definition, each extension lives in its own sandbox and is not aware of other extension.
The only chance is to look out of the window (object) and search for footprints (modifications of the window or child objects) of other extensions.
If these are forced to stay at home (deactivated), the can't leave footprints..
Sry for being so figurative ;)

Related

How would I call WebView2 and other modern winmd features in VBA

I would like to embed a modern WebView2 component (Edge Chromium Browser Control) inside an old-style VBA UserForm.
I surmise that I would need the following installed on the system:
Edge Chromium Broswer
Webview2 SDK
While I have the Edge Chromium Browser installed I am unsure how to install the Webview2 SDK outside of the context of a specific Visual Studio Project. To use it in a VBA solution it needs to reference some sort of global system-wide file?
Then, apparently the type library which contains the functionality we need to embed the Edge browser is Windows.Web.winmd. I presume I would need to "reference" that in some way but I am not sure how...
The closest thing I have found to answering this question is the following set of dlls:
http://vbrichclient.com/#/en/Downloads.htm

NPRuntime plugin says Missing Plug-in in Safari(Windows)

I have developed an NPRuntime plugin, everything is ok, but it not initialized in Safari. I registered the plugin in MozillaPlugins registry key, it works fine for Chrome/FF/Opera, but Safari writes the the plugin is missing, although I found my plugin in the list of isntalled safari plugins. What am i doing wrong ?
That's real hard to say. Safari on windows isn't supported real well by Apple, so I don't bother supporting it much myself. If it's really important I'd recommend adding logging in all your NPP_ methods (and your NP_ functions too) and see what is getting called; find out if it even loads your plugin. Often if something doesn't go as the browser wants during startup it will act like it didn't find it at all.
You could also use Process Monitor to see if it is trying to load the file or not.

Using a plugin generated with Firebreath in a Firefox Extension?

Is it possible to use a .dll made with Firebreath in a Firefox extension?
Currently, I am trying to port an extension I made for Google Chrome that uses javascript to get the HTML of the document, and then calls a function from the .dll and passes the HTML of the document as a parameter. The .dll then saves the file and launches a program.
Is there a simple way to port this functionality over to Firefox? Or will I have to rewrite the code using XPCOM?
XPCOM is too complicated for simple things which is why Firefox 4 and above has js-ctypes (see https://developer.mozilla.org/en/js-ctypes for an overview and https://developer.mozilla.org/en/js-ctypes/Using_js-ctypes#Calling_Windows_routines for an example). This allows you to load the DLL and call an exported native function easily. If you really need to use this DLL as an NPAPI plugin things get more complicated because you need a window to load the plugin into and Firefox unlike Chrome doesn't have a dedicated background window for that. But I guess that you only turned your DLL into a plugin to be able to use it in Chrome.
On locating your DLL to use with ctypes.open() see my answer here: Reference a binary-component to js-ctypes
For simple functionality, I also recommend js-ctypes. It is easy to use and provides good isolation (since scripts on the page cannot access the imported library).
If you really need to access an NPAPI plugin from any page, the standard approach seems to be to create an extension and modify the DOM of each page to include the plugin:
Scriptable NPAPI plugin doesn't work with Firefox
yes you can use a firebreath dll as an firefox extension. you can use the same javascript with some modifications for Firefox and for HTML you have to use XUL. You have to load the script in a XUL that overlays default firfox's browser.xul
overlay chrome://browser/content/browser.xul chrome://Yourproject/content/Youroverlay.xul
Inside Youroverlay.xul, you can add the below line to embed Firebreath dll
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/"?>
<overlay id="myOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<script type="application/javascript" src="chrome://Yourproject/content/background.js"/>
<vbox style="height:0;">
<html:embed type="application/x-myproject" id="myproject1" style="height:0;"/>
</vbox>
</overlay>

Show a window from 32-bit NPAPI Plugin in 64-bit Safari

I have an old NPAPI plugin for OS X that I'm trying to refit for use with Snow Leopard's version of Safari. My problem is that when I switch Safari to 64-bit mode, it changes the plugin environment to out of process mode (where plugins are hosted by a 32-bit WebKitPluginHost process). And now my toolbar palettes are not visible on screen, even though the NSPanels on which they are based think they are visible. The documentation says that bringing up windows is not recommended, but doesn't say its prohibited; is there something I can do to bring up my Windows?
The most reliable solution is to simply let another application, possibly connected to your plugin via some IPC mechanism, do thatApple:
Avoid creating windows. The intent is for plug-ins to operate within the browser window. Although some plug-ins have historically done so, creating windows in your plug-in is not recommended. If you need to maintain separate windows, you should consider starting a separate application.
Bringing up windows from a plugin might work in some circumstances and completely break in different ones. By recommending against doing so Apple is at liberty to break your previously working behaviour whenever it wishes to.
Unfortunately, probably not. If you're doing anything that is not possible using the normal graphics libraries (CoreAnimation, Cocoa, etc), you probably can't do it using the 32 bit plugin in 64 bit safari.
You might be able to do more if you compile your plugin in 64 bit mode, though. I don't know :-/
I know I am a little late. Safari doesn't allow plugin to display NSPanel. You should try using NSWindow instead. I know Apple doesn't agree.
For showing menu you could use "popupcontextmenu". It takes NPNSMenu which is NSMenu typecasted.

How to create firefox3 sidebar?

Hi I want to create sidebar in Firefox 3 but have no clue how to do this.
I find tutorial on MDC (https://developer.mozilla.org/en/Creating_a_Firefox_sidebar) but after installation extension do not work with "not compatible with Firefox 3.0.3" error.
Does anybody have any tip or link to some resource about how to make sidebar?
Well, a Firefox extension, be it a sidebar, toolbar or whatever other type of extension is basically a mix of XUL and Javascript, all packaged nice and tidy into an installer package called an XPI.
For an excelent XUL tutorial see http://xulplanet.mozdev.org/tutorials/xultu/.
For information about building extensions and the package format see https://developer.mozilla.org/en/Building_an_Extension.
For a sidebar you basically have to override the browser's sidebar area by using an overlay. For good overlay information check out MDC and the excerpt at http://www.oreillynet.com/pub/a/mozilla/excerpt/FirefoxHacks_chap01/.
All you need except the links above is knowledge of XML, some Javascript and a creative mind.
To fix the problem you faced above, you have to specify the correct version of Firefox in the install.rdf file. For Firefox 3 set maxVersion to:
<em:maxVersion>3.*</em:maxVersion>