diff options
Diffstat (limited to 'src/content/actions')
| -rw-r--r-- | src/content/actions/find.js | 12 | ||||
| -rw-r--r-- | src/content/actions/operation.js | 5 | 
2 files changed, 12 insertions, 5 deletions
diff --git a/src/content/actions/find.js b/src/content/actions/find.js index 80d6210..b266216 100644 --- a/src/content/actions/find.js +++ b/src/content/actions/find.js @@ -14,6 +14,13 @@ const postPatternNotFound = (pattern) => {      'Pattern not found: ' + pattern);  }; +const postPatternFound = (pattern) => { +  return consoleFrames.postInfo( +    window.document, +    'Pattern found: ' + pattern, +  ); +}; +  const find = (string, backwards) => {    let caseSensitive = false;    let wrapScan = true; @@ -34,9 +41,12 @@ const findNext = (keyword, reset, backwards) => {      window.getSelection().removeAllRanges();      found = find(keyword, backwards);    } -  if (!found) { +  if (found) { +    postPatternFound(keyword); +  } else {      postPatternNotFound(keyword);    } +    return {      type: actions.FIND_SET_KEYWORD,      keyword, diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js index 5fd0f48..71b2470 100644 --- a/src/content/actions/operation.js +++ b/src/content/actions/operation.js @@ -62,10 +62,7 @@ const exec = (operation, repeat, settings) => {      return focuses.focusInput();    case operations.URLS_YANK:      urls.yank(window); -    return consoleFrames.postMessage(window.document, { -      type: messages.CONSOLE_SHOW_INFO, -      text: 'Current url yanked', -    }); +    return consoleFrames.postInfo(window.document, 'Current url yanked');    case operations.URLS_PASTE:      return urls.paste(window, operation.newTab ? operation.newTab : false);    default:  | 
