Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Plugin API

Tim Süberkrüb edited this page Nov 14, 2015 · 1 revision

Liri Plugin API

Features and Permissions

  • common
  • network
  • omniplet
  • bookmarks
  • history

Actions

bool liri.fetchURL(string url, function callback(content))

Fetches web content. The text is returned as first argument of callback. Returns false if the access was blocked because of insufficient permissions else true. Requires feature network.

bool liri.appendSearchSuggestion(string text, string icon, string insertMode="end")

Appends a search suggestion. Requires feature omniplet.

array liri.getHistory()

Returns the browser history as array. Requires feature history.

array liri.getBookmarks()

Returns the browser bookmarks as array. Requires feature bookmarks.

Register events

bool liri.on(string event, function callback)

Registers callback for event event. Returns true if the operation was successful or false if it failed. It will fail if event is unknown or the plugin has insufficient permissions.

Events

  • load Called on plugin load.
  • omnibox.search Triggered when text of the omnibox has changed. Requires feature omniplet
Clone this wiki locally