aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions/operation.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-08 20:01:57 +0900
committerGitHub <noreply@github.com>2017-10-08 20:01:57 +0900
commit8b9125871b59d915324176ab959bb0aed20a727a (patch)
treea10db125bd25c1447bb08de2ef156c010243f019 /src/content/actions/operation.js
parentbbf90e77e99846c970118744066fbc21006761b5 (diff)
parent7ac00fce6f6c431f96c531179c6af3796df7e07a (diff)
Merge pull request #24 from ueokande/yank-url
Yank url
Diffstat (limited to 'src/content/actions/operation.js')
-rw-r--r--src/content/actions/operation.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js
index d188a60..0d5088b 100644
--- a/src/content/actions/operation.js
+++ b/src/content/actions/operation.js
@@ -2,7 +2,9 @@ import operations from 'shared/operations';
import messages from 'shared/messages';
import * as scrolls from 'content/scrolls';
import * as navigates from 'content/navigates';
+import * as urls from 'content/urls';
import * as followActions from 'content/actions/follow';
+import * as consoleFrames from 'content/console-frames';
const exec = (operation) => {
switch (operation.type) {
@@ -32,6 +34,12 @@ const exec = (operation) => {
return navigates.parent(window);
case operations.NAVIGATE_ROOT:
return navigates.root(window);
+ case operations.URLS_YANK:
+ urls.yank(window);
+ return consoleFrames.postMessage(window.document, {
+ type: messages.CONSOLE_SHOW_INFO,
+ text: 'Current url yanked',
+ });
default:
browser.runtime.sendMessage({
type: messages.BACKGROUND_OPERATION,