A fork of https://github.com/ueokande/vim-vixen
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.
37 lines
817 B
37 lines
817 B
7 years ago
|
//
|
||
|
// window.find(aString, aCaseSensitive, aBackwards, aWrapAround,
|
||
|
// aWholeWord, aSearchInFrames, aShowDialog);
|
||
|
//
|
||
|
// 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, false);
|
||
|
return {
|
||
|
type: actions.FIND_SET_KEYWORD,
|
||
|
keyword,
|
||
|
};
|
||
|
};
|
||
|
|
||
|
const prev = (keyword) => {
|
||
|
// TODO Error on no matched
|
||
|
window.find(keyword, false, true, true, false, true, false);
|
||
|
return {
|
||
|
type: actions.FIND_SET_KEYWORD,
|
||
|
keyword,
|
||
|
};
|
||
|
};
|
||
|
|
||
|
export { show, hide, next, prev };
|