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.

37 lines
790 B

//
// window.find(aString, aCaseSensitive, aBackwards, aWrapAround,
// aWholeWord, aSearchInFrames);
//
// NOTE: window.find is not standard API
// https://developer.mozilla.org/en-US/docs/Web/API/Window/find
import actions from 'content/actions';
const show = () => {
return { type: actions.FIND_SHOW };
};
const hide = () => {
return { type: actions.FIND_HIDE };
};
const next = (keyword) => {
// TODO Error on no matched
window.find(keyword, false, false, true, false, true);
return {
type: actions.FIND_SET_KEYWORD,
keyword,
};
};
const prev = (keyword) => {
// TODO Error on no matched
window.find(keyword, false, true, true, false, true);
return {
type: actions.FIND_SET_KEYWORD,
keyword,
};
};
export { show, hide, next, prev };