aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/mode_normal.coffee9
1 files changed, 9 insertions, 0 deletions
diff --git a/content_scripts/mode_normal.coffee b/content_scripts/mode_normal.coffee
index 738f009e..e91feecf 100644
--- a/content_scripts/mode_normal.coffee
+++ b/content_scripts/mode_normal.coffee
@@ -95,6 +95,15 @@ NormalModeCommands =
url = url[0..25] + "...." if 28 < url.length
HUD.showForDuration("Yanked #{url}", 2000)
+ openCopiedUrlInNewTab: (count) ->
+ HUD.pasteFromClipboard (url) ->
+ for i in [0...count] by 1
+ chrome.runtime.sendMessage { handler: "openUrlInNewTab", url }
+
+ openCopiedUrlInCurrentTab: ->
+ HUD.pasteFromClipboard (url) ->
+ chrome.runtime.sendMessage { handler: "openUrlInCurrentTab", url }
+
# Mode changes.
enterInsertMode: ->
# If a focusable element receives the focus, then we exit and leave the permanently-installed insert-mode