lantern icon indicating copy to clipboard operation
lantern copied to clipboard

Proof of concept on Chrome Extension install

Open myleshorton opened this issue 12 years ago • 17 comments

Would be great to verify that we can install extensions successfully without forcing the user through an external browser UI like the Chrome Store.

myleshorton avatar Jun 04 '14 19:06 myleshorton

Here's an article on that - https://developer.chrome.com/extensions/external_extensions

oxtoacart avatar Jun 04 '14 20:06 oxtoacart

@myleshorton It's completely possible to add extensions without going through the Web Store, but you must have them install it in Developer Mode:

  • Go to chrome://extensions/
  • ☑ Developer mode
  • Click "Load unpacked extension"
  • Choose Lantern extension directory

This is the alt distribution method I use for Satori and Cupcake, and it works pretty well. It used to be possible to distribute a .crx file, but that was disallowed as of Chrome v33. Hope this helps!

glamrock avatar Jun 05 '14 02:06 glamrock

Also, I was able to install the Lantern chrome extension this way. :grinning:

glamrock avatar Jun 05 '14 02:06 glamrock

Darn thanks Griffin! That's what I had thought, and now looking more closely at https://developer.chrome.com/extensions/external_extensions they do verify that at least on windows it needs to be in the store or presumably run with developer mode.

That honestly seems like a deal breaker to me, but that's not been your experience huh? Do you think your users are particularly more savvy or determined or both than the average?

Thanks so much for chiming in! Much appreciated.

On Wednesday, June 4, 2014, Griffin Boyce [email protected] wrote:

Also, I was able to install the Lantern chrome extension this way. [image: :grinning:]

— Reply to this email directly or view it on GitHub https://github.com/getlantern/lantern/issues/1573#issuecomment-45175552.

myleshorton avatar Jun 05 '14 05:06 myleshorton

@myleshorton Why is putting the extension in the Chrome webstore a deal breaker?

oxtoacart avatar Jun 05 '14 09:06 oxtoacart

Also, per this article, local extension installs are still supported via enterprise policy.

oxtoacart avatar Jun 05 '14 09:06 oxtoacart

More information - http://www.chromium.org/administrators/pre-installed-extensions

oxtoacart avatar Jun 05 '14 10:06 oxtoacart

Looks like inline installation may be the recommended way.

oxtoacart avatar Jun 05 '14 11:06 oxtoacart

Here is an example page that allows inline installation of an example Lantern extension:

https://s3.amazonaws.com/oxtoacart/install.html

According to the tutorial, we can set up our extension so that it communicates the fact that it's already installed, in which case we can suppress the prompt to install it.

Note that inline installation is what is used by the popular LastPass extension. To use LastPass, you download an installer. Running that installer installs extensions for Firefox, IE, etc. For Chrome, it appears to install the extension automatically on Mac, but on Windows it opens a page with a big button prompting you to install the extension. That seems like a pretty good installation experience.

oxtoacart avatar Jun 05 '14 12:06 oxtoacart

I should point out that:

  1. To make this work, I had to verify https://s3.amazonaws.com/oxtoacart with Google Webmaster Tools.
  2. This is blocking resistant. If a proxy is configured, chrome will download the extension via the proxy server, so even if the Chrome Web Store is blocked, as long as Lantern has been installed and is running, that's no problem.

oxtoacart avatar Jun 05 '14 12:06 oxtoacart

Very cool!! This was all making me think back to the concept of running the whole UI as a static site on S3. I think there was some issue there but can't remember offhand. That approach is still attractive to me and would easily support this use case.

On Thursday, June 5, 2014, oxtoacart [email protected] wrote:

I should point out that:

To make this work, I had to verify https://s3.amazonaws.com/oxtoacart with Google Webmaster Tools. 2.

This is blocking resistant. If a proxy is configured, chrome will download the extension via the proxy server, so even if the Chrome Web Store is blocked, as long as Lantern has been installed and is running, that's no problem.

— Reply to this email directly or view it on GitHub https://github.com/getlantern/lantern/issues/1573#issuecomment-45212291.

myleshorton avatar Jun 05 '14 13:06 myleshorton

@myleshorton Yes, I think this would be a good time to revisit the idea of hosting the UI on S3. The main thing to figure out there is cross-domain stuff, since the server would be running on localhost. CORS should allow us to solve this.

@atavism I think that a nice way to flesh out this example would be to build something like this:

  • Web page hosted on S3
  • Web page checks for presence of custom extension and prompts use to install it if not yet installed
  • Web page is able to talk to a back-end on localhost to do something (doesn't matter what)
  • Extension is also able to talk to the back-end on localhost to do something
  • Web page is able to influence extension somehow (e.g. toggle a switch and have extension icon change or something like that)

If you can demonstrate all those pieces working, then I think we can be quite confident that doing an extension is viable.

oxtoacart avatar Jun 05 '14 15:06 oxtoacart

I should note that "Web page is able to influence extension somehow (e.g. toggle a switch and have extension icon change or something like that)" could just mean web page talking to back-end to modify some state, which is then reflected in the extension itself (perhaps using websockets to make the updates real-time).

oxtoacart avatar Jun 05 '14 15:06 oxtoacart

Okay, I have a POC that demonstrates the salient elements. It's available in the updated chrome-extension project.

screen shot 2014-06-12 at 9 34 32 am

oxtoacart avatar Jun 12 '14 14:06 oxtoacart

Just tried this out and got to see the number increment. So awesome! This is a great starting point.

atavism avatar Jun 12 '14 22:06 atavism

Thanks for trying it out! Glad it worked for you.

Cheers, Ox


"I love people who harness themselves, an ox to a heavy cart, who pull like water buffalo, with massive patience, who strain in the mud and the muck to move things forward, who do what has to be done, again and again."

  • Marge Piercy

On Thu, Jun 12, 2014 at 5:23 PM, atavism [email protected] wrote:

Just tried this out and got to see the number increment. So awesome! This is a great starting point.

— Reply to this email directly or view it on GitHub https://github.com/getlantern/lantern/issues/1573#issuecomment-45955691.

oxtoacart avatar Jun 13 '14 01:06 oxtoacart

Looks like this is done, so closing this proof-of-concept ticket.

scouttle avatar Sep 04 '14 21:09 scouttle