API

Control Maxel from scripts and plugins.


API Documentation

Maxel responds to the maxel:// protocol.


The link takes the format maxel://action/payload

Currently, the only supported action is add, which adds links to the add sheet and pops it open if not already open.

The payload is a JSON string that's been URI encoded. For the add action, it looks like this:

{
  "version": 0.8, // minimum version of Maxel required to handle this message
  "agent": "YourAppName",
  "urls": [ // Contains as many links as you want
    {
      "href": "http://example.com",
      "title": "Example" // optional, not used today
    },
    {
      "href": "sftp:[email protected]/file",
      "title": "SFTP Example"
    }
  ]
}
  

After converting to a JSON string and URI encoding, it will look something like this:

maxel://add/%7B"version"%3A0.8%2C"agent"%3A"Chrome2Maxel"%2C"urls"%3A%5B%7B"href"%3A"http%3A%2F%2Flocalhost%3A4000%2Ffaq.html%23browserext"%2C"title"%3A"your%20browser"%7D%5D%7D