Extensions-like context menu in Chrome Apps (browser wide) - google-chrome

I have been practicing with Chrome extensions and apps and noticed chrome.contextMenu is not browser-wide for Chrome Apps. It only manages the context menu of the App background windows.
Is there a way to create browser-wide context menus like extensions have? If there isn't any API in Apps, how can I also include an extension with my app so that users won't need to install two different things?
Here is the project: https://github.com/metherealone/chorrent
Obviously, I only need to catch magnet links and torrent files with the extension.

Apps and extensions are separate by design. If your app needs an extension (as many desktop apps do), write one. Once you've done that, it's fairly easy for them to communicate with messaging.
As for installing two things at once, your best bet is to detect the absence of the extension (perhaps by messaging and noticing that nobody responds), and recommend the installation of it. You probably shouldn't design your system so that it's broken if the user chooses to install one but not the other.

Related

Security - Use chrome extensions only for development

I am using chrome for web development and as my main browser. I have installed some extensions that I am using only for development like JSONView.
In most cases such kind of extensions requiring some extra permissions, like
Read and change all your data on the websites you visit
Is there any way to separate use of this extensions only for development and not use when I am logged in in something personal. So even if some extension will want still some personal data, that will not be possible.
Use multiple Chrome profiles.
Each profile has its own data and its own set of extensions.
As long as you don't install any extensions that can access the filesystem, they're completely separate.

Why does developing a firefox extension involve installing an sdk?

I'm currently trying to port a Chrome extension into a Firefox add-on, but the development process is incredibly different, and the part in particular that I find confusing is why I should have to install an SDK.
How are these two so different? Do Firefox add-ons run faster because they're precompiled? Why aren't firefox add-ons just HTML and javascript like (some) Chrome ones?
What's going on behind the scenes here that involves using so much command line just to get a firefox addon started?
The SDK exists to help developers build their extentions, but if you don't want to use it there is also a way.
You can use web extensions which as the wiki says have their benefits:
Porting add-ons to and from other browsers should be easier.
Reviewing add-ons for addons.mozilla.org should be easier.
WebExtensions must be compatible with multiprocess Firefox (Electrolysis).
Changes to Firefox's internal code should be less likely to break add-ons.
WebExtensions should be easier to use than the existing Firefox XPCOM/XUL APIs.
I don't have personal experience with web extension but it seems to be promising for someone who does not want to use SDK and the benefits ofthe web extensions are that they support an enrich manifest document and you only need to zip your extension and run it.
There are some examples on github to get started.

What cross-browser technology do you use in your web applications to manipulate on client machines?

(I have a problem with Google Chrome improvements that will drop support for my current solutions.)
I work on project where I move desktop system to an Intranet web application.
The crucial requirements are:
to move desktop system to a web application
to reproduce every single functionality from the desktop system in the webapp
While 95% of work requires creating casual web application, there is one thing which is non-standard to handle: my application must perform some actions on the client computer. These includes:
connecting with libraries
launching desktop apps
file manipulation in background
The example scenario is to integrate my system with some machine in the lab. I have to integrate my web application with drivers on client computer via DLL (desktop app did this, so my app have to do this as well).
Theoretically scenarios of the desktop actions may vary and I just want to implement some interface that will handle all the "client-machine" job the desktop app has done, so there is no need to work on every single scenario (but of course every scenario should be tested).
My solution was Java Applet. It worked. But then Google Chrome decided to drop support for NPAPI plugins, so in September'15 Java plugin (and my applet) won't be supported (http://blog.chromium.org/2014/11/the-final-countdown-for-npapi.html).
So my another solution is Java Web Start. It works. But now Google Chrome decided to drop support for background operations of external protocols (https://code.google.com/p/chromium/issues/detail?id=348640), so from Google Chrome 45 my Java Web Start solution won't be supported.
(Both above solutions work on Firefox and IE.)
The question:
What other technology can I use to interact with a client machine from my web app?
Other remarks:
I am reluctunt to write my own PPAPI plugin or Chrome Extension - I prefer one solution working on all major browsers.
I know that StackOverflow community does not like discussions about technologies, so please focus on describing possible solution to my problem.
We struggled with a similar problem as we need to connect/access electronic devices over JNI->DLL. The only technology where this is currently possible are applets. Period. (And even that is tricky since certain combinations of browsers/java versions/operating systems do not work or have problems, but this is another story...)
There are web technologies like HTLM5, JScript which can replace some functionalities of applets however in certain scenarios (like yours) there is no current alternative available - and you named some of those:
connecting with libraries like *.dll, *.so etc.
file manipulations
launching applications
And doing that across browsers and operating systems!
Solutions?
Tell your users that certain browsers can't be used (like Chrome and
Opera Next)
Write individual plugins for each browser (which probably is beyond your budget ;-)
Did you consider writing standalone application(s) in form of an executable file? The user must download and run it however e.g. java or plugins also need to be installed. But then there is the security aspect of that (downloading an and executing an executable file) - certainly not an easy decision
Have a look at FireBreath 2 - (just read about it in some posts, however didn't try it)
There are lots of discussions on SO to this topic so take a read:
alternative technologies to replace applets
applet alternative launch from browser
alternatives to java applet to launch microsoft office applications
alternative-java-applet-network-drive-access
what are the alternatives for java applet to launch client programs using chrome
alternative of npapi plugins for flash java applet
python alternative to java applet
npapi alternative for live file editing
... and many, many more!

My iphone app pilot available to download outside of apps store

I have a server at work that I want to host an iphone application on.
I want it so that the user goes to the web browser on their ihpone and clicks a download link on a html page and iphone application is installed on their phone.
Is there any way that this is possible using xocde? Perhaps some way I can build a .plist file that does this?
Thanks
Unfortunately, you cannot install a native iPhone application without going through the App Store (unless you wish to publish your app solely to jailbroken devices). If you really don't want to use the app store, you can build a web app that runs on the server, but you cannot install and run arbitrary binaries on a users device that have not been approved by Apple.
EDIT: As people have pointed out, there are options for testing purposes that will allow you to install your app on other devices via the internet (TestFlightApp, iOS Enterprise program), but for a wide-scale deployment technique this will not work.
Jumhyn is right in his answer but there is a little more to it.
If you want your App to be available to iPhone users (non-jailbroken) you have to have an Apple developer account ($99/yr)
If you want to develop only for jailbroken devices you can, but i'm not sure about the license agreements you accept when using Xcode and Cocoa(touch) framework. It might be a violation of your agreement.
The last solution is the Apple Enterprise developer program ($299/yr). Here you can control who has access to your app and I think it is possible to distribute around the App Store. There is definitely some limitation.
One thing is sure. You cannot do installation from websites as you want without going around Apple's App Store. I strongly recommend sticking to the rules and agreements you accepted when activating OS X, Xcode, iPhone and the Cocoa Framework.
If you are trying to permanently deploy to a website, this will not work for legitimate App Store applications. You can however, once published to the app store, place a link to to it that will take them to the AppStore for downloading it.
If you need this for testing/beta purposes I reccommend www.testflightapp.com

Silently install voices for a ttsEngine extension

I'm creating a speech extension for my webpage in order to make it accessible for blind people. This works good so far, now I wanted to have the two voice engines I picked installed automatically. And this has proven to be really difficult:
I've been through tons of info on how to approach this. The easiest way would be to just open the voice (ttsEngine)'s web page in the Chrome store - but then the blind people would have to go through all this hassle as well.
Most other approaches require computer permissions I do not have, e.g. messing with the user's file system or registry.
My question: Is there really no easy way to require, include or preinstall another extension for your extension, so it installs in the background (silently)?
Thanks for hearing me out and providing some help!
Kind regards,
Roman
Do you have permission to modify / extend / redistribute the other extensions? they could probably be merged into a single extension with your code, if for example they are open source.
I have also posted this issue in google groups's Chromium-extensions, there the result was that such a thing is not (yet?) possible with extensions only.
It is true that if they were open source I could maybe include them into my project, yet these are not.
For now it seems I have to either do it with "management" like suggested in the link or create an installable that messes with the Chrome extensions.