alexeyr / webextensions-lib-shortcut-customize-ui

Generates configuration UI for keyboard shortcuts, for WebExtensions-based Firefox addons.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webextensions-lib-shortcut-customize-ui

Generates configuration UI for keyboard shortcuts, for WebExtensions-based Firefox addons.

Screenshots

(Screenshot of generated UI)

Basic usage

Load the file ShortcutCustomizeUI.js from any document (options page, sidebar panel, or browser action panel), like:

<script type="application/javascript" src="./ShortcutCustomizeUI.js"></script>

And, call ShortcutCustomizeUI.build(). It returns a promise resolved with a DOM element:

ShortcutCustomizeUI.build().then(list => {
  document.getElementById('shortcuts').appendChild(list);
});

Need controbution for internalitonalization

By default, shortcut keys and modifier keys are shown with their general name listed at the API document, but such raw key names may confuse people in some locales. Thus this project needs more help for internationalization/localization. Please pull requests to update the built-in definitions for localized key names.

About

Generates configuration UI for keyboard shortcuts, for WebExtensions-based Firefox addons.

License:MIT License


Languages

Language:JavaScript 100.0%