Jetpack lets you specify arbitrary content that will be shown to your users when they install your jetpack. You can also register a callback that will be called after installation.
First-run page
When users install your jetpack, they will be greeted with a new page notifying them that installation was successful. By default this page contains some simple text explaining that they may now use the jetpack and how to uninstall it. You can replace this text with a page tailored to your jetpack. For example, you may want to tell users how to use your jetpack or link to your jetpack's homepage. This page can be defined as either HTML or a remote URL.
The first-run page is defined by the firstRunPage
property of your jetpack's manifest. A manifest is simply an object set to a variable named manifest. You may define this variable anywhere in the global namespace of your jetpack. It's the same manifest you use when defining settings for your jetpack.
The value of firstRunPage
must be either a string or E4X XML. If the value is a both a string and a valid URL, the page at that URL becomes your first-run page. Otherwise, the value is assumed to be HTML, and it becomes the body of your first-run page.
This example sets the first-run page to some HTML:
var manifest = {
firstRunPage: '<p>Thanks for installing! Visit my <a href="http://example.com/myJetpack">homepage</a>.</p>'
};
This does the same but uses E4X XML:
var manifest = {
firstRunPage: <>
<p>
Thanks for installing! Visit my <a href=//example.com/myJetpack">homepage</a>.
</p>
</>
};
In this example, the page at [http://example.com/myJetpack] becomes the first-run page:
var manifest = {
firstRunPage: "http://example.com/myJetpack"
};
First-run callback
You can register a callback that will be called after your jetpack has been successfully installed. See [jetpack.me.onFirstRun()]
[]