Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.52 KB

extending-functionalities.md

File metadata and controls

47 lines (31 loc) · 1.52 KB

Extending functionalities

Table of contents

Cross-extension messaging

See the following examples:

~/.config/krabby/config.js

const { extensions, modes } = krabby
const { modal } = modes

// Your awesome extension
extensions.your_awesome_extension = {}
extensions.your_awesome_extension.port = chrome.runtime.connect(your_awesome_extension_id)
extensions.your_awesome_extension.send = (command, ...arguments) => {
  extensions.your_awesome_extension.port.postMessage({ command, arguments })
}

// Mappings
modal.map('Command', ['F2'], () => extensions.your_awesome_extension.send('something'), 'Call something from your awesome extension', 'Your awesome extension')

See Cross-extension messaging for a complete reference.

Plugins

See the following examples:

Search the following topics #krabby #plugin for other plugins.