diff options
Diffstat (limited to 'src/content/actions')
-rw-r--r-- | src/content/actions/find.js | 25 | ||||
-rw-r--r-- | src/content/actions/operation.js | 2 |
2 files changed, 4 insertions, 23 deletions
diff --git a/src/content/actions/find.js b/src/content/actions/find.js index b3d7e30..e08d7e5 100644 --- a/src/content/actions/find.js +++ b/src/content/actions/find.js @@ -9,25 +9,6 @@ import messages from 'shared/messages'; import actions from 'content/actions'; import * as consoleFrames from '../console-frames'; -const postPatternNotFound = (pattern) => { - return consoleFrames.postError( - window.document, - 'Pattern not found: ' + pattern); -}; - -const postPatternFound = (pattern) => { - return consoleFrames.postInfo( - window.document, - 'Pattern found: ' + pattern, - ); -}; - -const postNoPrevious = () => { - return consoleFrames.postError( - window.document, - 'No previous search keywords'); -}; - const find = (string, backwards) => { let caseSensitive = false; let wrapScan = true; @@ -60,13 +41,13 @@ const findNext = async(currentKeyword, reset, backwards) => { }); } if (!keyword) { - return postNoPrevious(); + return consoleFrames.postError('No previous search keywords'); } let found = find(keyword, backwards); if (found) { - postPatternFound(keyword); + consoleFrames.postInfo('Pattern found: ' + keyword); } else { - postPatternNotFound(keyword); + consoleFrames.postError('Pattern not found: ' + keyword); } return { diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js index 1aeb8be..b96c6b9 100644 --- a/src/content/actions/operation.js +++ b/src/content/actions/operation.js @@ -85,7 +85,7 @@ const exec = (operation, repeat, settings, addonEnabled) => { break; case operations.URLS_YANK: urls.yank(window); - consoleFrames.postInfo(window.document, 'Current url yanked'); + consoleFrames.postInfo('Current url yanked'); break; case operations.URLS_PASTE: urls.paste( |