You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

19 lines
518 B

import * as messages from '../../shared/messages';
import * as actions from './index';
const enable = (): Promise<actions.AddonAction> => setEnabled(true);
const disable = (): Promise<actions.AddonAction> => setEnabled(false);
const setEnabled = async(enabled: boolean): Promise<actions.AddonAction> => {
await browser.runtime.sendMessage({
type: messages.ADDON_ENABLED_RESPONSE,
enabled,
});
return {
type: actions.ADDON_SET_ENABLED,
enabled,
};
};
export { enable, disable, setEnabled };