Extensions

Make your own island widget from a small web page.

An extension is your own widget: a small web page that Hop Island shows on its pages like any other widget. Two come with Hop as examples, a world clock and a big countdown.

Switch one on

  1. Open the settings and go to Extensions.
  2. Switch the extension on. It joins your pages as a widget; place it in Pages & widgets.

Make one

Extensions live in %APPDATA%\Hop\extensions, one folder each. Open folder in the settings takes you there.

my-widget\
  manifest.json
  page.html

manifest.json:

{
  "name": "My widget",
  "description": "What it shows",
  "page": "page.html",
  "version": "1.0"
}

page.html is an ordinary web page. Give it a transparent background and white text so it matches the island. It is shown at the size of its widget, so make it fit any size (the examples use CSS media queries).

Pop-ups from an extension

An extension can ask the island for a pop-up:

parent.postMessage({ hop: "popup", title: "Build finished", text: "All tests passed" }, "*");

Important

Extensions run in a sandbox: they can't read your files or reach Hop's settings. They can still load things from the internet, so only add extensions you trust.

Something wrong or missing on this page? Tell us on GitHub.

Type to search every docs page.