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.
 
 
 

23 lines
625 B

import * as messages from '../../shared/messages';
export default interface FindClient {
getGlobalLastKeyword(): Promise<string | null>;
setGlobalLastKeyword(keyword: string): Promise<void>;
}
export class FindClientImpl implements FindClient {
async getGlobalLastKeyword(): Promise<string | null> {
let keyword = await browser.runtime.sendMessage({
type: messages.FIND_GET_KEYWORD,
});
return keyword as string;
}
async setGlobalLastKeyword(keyword: string): Promise<void> {
await browser.runtime.sendMessage({
type: messages.FIND_SET_KEYWORD,
keyword: keyword,
});
}
}