Is it possible to convert a Jetpack extension to a chrome one? - google-chrome-extension

Is it possible to convert a FF Jetpack extension to a chrome's one? I've read something about wrappers but I don't know if they have already implemented one.
Thank you

No. In general, extensions based on the Firefox Add-on SDK are more powerful - chrome authority gives them access to all browser internals, a level of access that Chrome extensions simply don't have. Even if you only look at the API provided by the SDK, it is different enough from Chrome's extension API that any kind of generic conversion is impossible. However, often you can convert an extension manually but reimplementing the necessary parts.

Related

How do I get access to all the files in the extension in Chrome Extension Manifest Version 3 (MV3)?

Background
I've been using the crx-hotreload package to auto-reload my chrome extensions during development because it's annoying to have to click the refresh button on the Extensions page every time you make a change; however, this package doesn't work with MV3 because it uses the chrome.runtime.getPackageDirectoryEntry method, which seems to have been removed from chrome.runtime in MV3. I can't find documentation to confirm that it was removed, but it's not there when I try to use it.
Questions
Does anyone know how to get access to all the files in the extension directory in Chrome Extension Manifest Version 3?
Or generally, is there a better way that I can hot-reload my chrome extensions during development that would work for MV3?
This is one of many things based on DOM capabilities of background pages that are removed from ManifestV3 because service workers don't have DOM. For example, getPackageDirectoryEntry is using the old nonstandard FileSystem API in its returned value.
As to why, apparently the switch to service workers simplifies the internal source code in Chromium, even if it doesn't provide any real improvements for extension authors or users.
At this point all you can do is present a convincing use case and ask Chromium developers via https://crbug.com to implement an alternative API.

Chrome extension to change Desktop wallpaper

I'm diving into the world of Chrome Extension development, primarily because there is a very small feature that is missing in Chrome that I miss dearly. The context-menu option to "Set as background/wallpaper" like that found in Firefox. Sounds trivial, but it's convenient.
I have most of the "basic" stuff worked out with the manifest file, am able to install it, even managed to get it to show up as a context menu item.
The problem obviously is that I am wanting to mess with a user's OS-level settings which is extremely difficult because of security issues (fully understand this).
I found an extension that allowed this in older versions of Chrome, and it looked like the developer used some type of .dll and C++ to accomplish this.
I'm not really sure how to make this work.
Since that Chrome doesn't allow these kind of manipulations (such as your PC's settings), you will need to create a native application that will run beside your extension. When the user chooses the image from your extension and selects "use as wallpaper", you will use the native messaging API to send a message to your desktop application, that will set the wallpaper (and do whatever else you can't do within a chrome extension) for you.
You can use the chrome.wallpaper app api to set the wallpaper after using the messaging api to send the image from your extension.

Global(system) hotkeys for chrome extension

Is it possible to create system hotkeys/shortcuts for Google Chrome Extension? I mean hotkeys that also works when Chrome doesn't have focus.
Yes, but it won't be trivial. To get truly global hotkeys you will have to use native messaging. You will need to create some application to run in the background and capture keypresses and then you can send those keypresses back to Chrome through stdout. This approach will require you to create an additional installer for your extension to install the native messaging app onto the user's system...before you could bundle your app along with the extension (using NPAPI) but that has recently been phased out. I have seen some discussion in the Chromium group about adding bundling support for native messaging apps, but nothing has been added (yet).
Another much easier option is to use the Chrome commands API which will enable you to use hotkeys across all Chrome windows (but not globally...). Just something to consider if "true" global hotkeys are not an absolute requirement since this approach is (much) less complex.
Global media keys will be added to Chrome soon, however. There is a good discussion about this feature to read here.
It's now part of Chrome: chrome://extensions/shortcuts

What are the differences between Google Chrome extensions and Firefox add-ons?

I have been developing Chrome extensions and as I have already mentioned in a question on SO, I have problems paying that starting charge witch Google asks. So I quit wasting my time developing extensions for a company that has no respect for developers and I'm starting to develop Firefox add-ons. So I'm a total newbie in this area.
First of all I have to mention that I am NOT looking for an automatic functionality/way to convert them. I have noticed that one difference between Firefox add-ons and Chrome extensions is that there is not such a thing as popup.html in Firefox (maybe I'm wrong).
How can I find other main differences so that I can convert my extensions to Firefox add-on?
Firefox addons do have a popup paneil in their SDK available to use(https://addons.mozilla.org/en-US/developers/docs/sdk/latest/modules/sdk/panel.html).
I'm developing a Firefox addon right now and I can tell you that their actual SDK and the develop environments are great, cfx to work offline or the online builder, both are powerful and easy.
Regarding the differences that you ask, besides a few structure differences and of course Chrome or Firefox specific code that is not going to work in the other platform, I think that it should be easy port an addon from one platform to another, no automatic but pretty straightforward.

IE or FF Launcher

I would like to know if it's possible to develop an extension that allows to open a link with another browser : If in Chrome I click on a link that is configured in such extension, it opens FF or IE with this link.
I didn't find any extension (except extension that have a frame in a chrome tab), so does that mean that there is a technical limitation to do that ?
Best regards
I did something for FF what could be modified to do just that.
I have used the ability to execute shell commands from an extension, and configured the call to launch a 3rd party application.
Look for examples on nsIProcess
In chrome you can use the NPAPI plugins: http://code.google.com/chrome/extensions/npapi.html
Unfortunately, I think that kms is correct in saying that you cannot execute native code in a Chrome Extension, and must therefore pair your extension with an NPAPI Plugin and have them talk to one another. It was one of the most difficult programming tasks I've ever done, although the NPAPI Plugin was made easier by basing it on FireBreath, so at least I didn't need to write very much C++.
UPDATE: Since 2014 or so, Native Messaging is included in Chrome's Web Extensions API and, mercifully, NPAPI is gone.

Resources