
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
jetpack-homepanel
Advanced tools
Module to add home panels to Firefox for Android with Jetpack.
This project is licensed unter the MPL 2.0. For the full license text, check out mozilla.org/MPL/2.0/.
Currently this module cannot be required via npm and has to be manually added to your source. You only need the files inside the lib folder and please take a look at the package.json, as it contains valuable information like compatibility and licensing, everything else is just decoration for your pleasure.
Represents a list or grid of items in a panel on the homescreen. Fennec currently only supports one per panel.
Items for the section follow https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/HomeProvider.jsm/HomeStorage#Item_attributes. The maximal number of supported items is 100.
Either has the value of Types.GRID or Types.LIST. Types.GRID shows
"thumbnails" like the default panel and Types.LIST shows the items in a list,
like the other default panels.
An string with a URL poitning to a background image for the panel.
Object with a text and imageUrl property, specifying the contents of the panel when there are no items to display.
List of items added to the section upon construction.
Boolean indicating, if a user can pull down to refresh the content of the panel. Defaults to true.
Event listener attached to the refresh event.
(readonly) ID of the section in the HomeStorage.
The (readonly) type of the section.
Array of items within the section.
This is a more efficient way of adding items to the section than setting the data attribute with a concatenated array.
Removes all items from the section
Cleans the object's private attributes and clears its items.
The refresh event can only get fired if manuallyRefreshable was true in the constructor. It is triggered after the user pulled down to refresh. The loading animation will only stop, if the data property is set or addData is called.
Adds a panel to fennec's homescreen.
The title displayed for the panel on the fennec homepage.
An array of at least one Sections. Firefox currently only supports one Section per HomePanel.
Event listener for the install event.
Event listener for the uninstall event.
Boolean indicating, whether or not the panel is currently accessible on Fennec's homescreen. Read only.
The title of the panel.
Sections in the panel.
Adds the panel to fennec's homescreen.
Removes the panel from fennec's homescreen.
Clears the panel's attributes and sections, which removes the panel from Firefox.
Fired whenever the panel is added to fennec's homescreen.
Fired whenever the panel is removed from fennec's homescreen.
const { HomePanel, Section, Types } = require("homepanel");
let section = Section({
type: Types.GRID,
data: [
{
url: "http://example.com/",
title: "An example item",
description: "An example description",
image_url: "http://lorempixel.com/190/190"
},
{
url: "http://example.com/",
title: "Another example item",
image_url: "http://lorempixel.com/95/95"
},
{
url: "http://just.an/url",
title: "Imageless item"
},
{
url: "http://example.com",
image_url: "http://lorempixel/191/191"
}
]
});
HomePanel({
title: "Example Grid Panel",
sections: [
section
]
});
The code above results in such a panel:

const { HomePanel, Section, Types } = require("homepanel");
HomePanel({
title: "Example List Panel",
sections: [
Section({
type: Types.LIST,
data: [
{
url: "http://example.com/",
title: "An example item",
description: "An example description",
image_url: "http://lorempixel.com/190/190"
},
{
url: "http://example.com/",
title: "Another example item",
image_url: "http://lorempixel.com/95/95"
},
{
url: "http://just.an/url",
title: "Imageless item"
},
{
url: "http://url.with/picture",
image_url: "http://lorempixel/190/190"
},
{
url: "http://example.com",
title: "Another imageless item",
description: "With a very, very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong description"
}
]
})
]
});
The code above results in a panel shown in this screenshot:

The item configuration for this example was taken from the MDN HomeProvider.jsm Example.
HomePanel({
title: "Example Panel with a Folder",
sections: [
Section({
type: Types.LIST,
data: [
{ url: "http://example.com/first",
title: "First Example" },
{ url: "http://example.com/second",
title: "Second Example" },
{ url: "filter://folder",
title: "Folder" },
{ url: "http://example.com/third",
title: "Filtered Example",
filter: "folder" }
]
})
]
});
The code above results in a panel like the following screenshots show:


FAQs
Module to add home panels to Firefox for Android with Jetpack
We found that jetpack-homepanel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.