If you follow me on Twitter, you know I'm
Feature detection is the best way to discover if the user's browser can install Firefox Marketplace applications:
var canInstallMozApp = !!(navigator.mozApps && navigator.mozApps.install);
Marketplace features live within the navigator object under the mozApps property. The install method triggers app installation, so that's ultimately the method whose existence should be checked. If present, the user has app install capabilities and you know you can show a "download our app" advertisement or, if your app manifest is configured properly, you can install the app from your own site!