Closed Bug 495582 Opened 17 years ago Closed 17 years ago

Bootstrap jetpack features to auto-install on add-on install

Categories

(Mozilla Labs :: Jetpack Prototype, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Mardak, Assigned: Mardak)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached patch idea (obsolete) — Splinter Review
Quick hacky idea.. Jetpack feature pages can link to https://jetpack.mozillalabs.com/bootstrap.html to have a cookie set to the referrer and trigger the add-on install. After installing, Jetpack can look for the cookie and install the feature <link>ed on the page.
Priority: -- → P1
Target Milestone: -- → 0.3
Target Milestone: 0.3 → 0.5
Assignee: nobody → edilee
Would be possible for AMO's install.php page to set a cookie on https://addons.mozilla.org/ that saves the referring page? I know weave uses the install.php, but I'm not sure what add-ons can use that? The javascript there seems to only allow referrers of mozilla.org/com, but jetpack would want to allow it from any site. What we would like to do is have jetpack feature writers provide a link to https://addons.mozilla.org/services/install.php?addon_id=jetpack on the same page they put the <link rel="jetpack">. If the user doesn't have jetpack installed, s/he will click the "install jetpack and this feature" link. install.php records the referring page in a cookie and on browser restart, jetpack will read out the value from the cookie on https://addons.mozilla.org/ and know what page to check for a jetpack feature to install. But I suppose we don't have to do the cookie thing. I should also be able to query places to see what pages are in the user's recent history leading up to the jetpack installation on AMO.
(In reply to comment #2) > But I suppose we don't have to do the cookie thing. I should also be able to > query places to see what pages are in the user's recent history leading up to > the jetpack installation on AMO. Yeah, you could use moz_historyvisits.from_visit to check referrers to a.m.o/services/install.php.
I'd rather not modify the install service to do custom stuff if possible. The method described in comment #1 sounds like it would work fine -- is that not the case? We can of course add mozillalabs.com as an approved referrer for it.
So, I just tested that loading amo/install.php in an iframe can still trigger the install. So a jetpack feature can link to a pretty jetpack.mozillalabs.com/install page that is an approved referrer to install.php. Sean: We'll need a page that features can link to trigger a jetpack add-on install. It's a very temporary page as once the install triggers, amo makes the page "go back". So it just needs to be a pretty splash-ish page saying "installing jetpack!" or something like that.
Depends on: 507467
http://hg.mozilla.org/labs/jetpack/rev/803fe0fa0113 Allow Jetpack Features to link to https://jetpack.mozillalabs.com/install.html, which will trigger an AMO Jetpack add-on install. After restart/install, look through Places for the referring page to install.html to load it in the hidden window to get the link rel=jetpack and fetch the code to add the feed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
http://hg.mozilla.org/labs/jetpack/rev/b4e31fccfc88 Update links that point to the .xpi on AMO to point to install.html, so pages that also use link rel=jetpack will auto-install the feature.
Attached patch patch to demoSplinter Review
Here's a simple patch that lets me demo the bootstrap/install process without the AMO install link working yet. I can show people tomorrow if they want.. 1) open up firefox 3.5 with a new profile 2) browse to file:///Users/Ed/jetpack/website/demos.html and pick a demo 3) click "install jetpack" (loads install.html and triggers install) 4) wait for 3..2..1.. install now for jetpack and restart firefox 5) see the feature already installed on restart (e.g., slidebar icon)
Attachment #380566 - Attachment is obsolete: true
Blocks: 508453
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: