Skip to content

Commit

Permalink
FF: Use HUD frame for openCopiedUrlIn{Current,New}Tab
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmr1993 committed Aug 15, 2017
1 parent c50c172 commit 6659501
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions background_scripts/commands.coffee
Expand Up @@ -337,8 +337,8 @@ commandDescriptions =
toggleViewSource: ["View page source", { noRepeat: true }]

copyCurrentUrl: ["Copy the current URL to the clipboard", { noRepeat: true }]
openCopiedUrlInCurrentTab: ["Open the clipboard's URL in the current tab", { background: true, noRepeat: true }]
openCopiedUrlInNewTab: ["Open the clipboard's URL in a new tab", { background: true, repeatLimit: 20 }]
openCopiedUrlInCurrentTab: ["Open the clipboard's URL in the current tab", { noRepeat: true }]
openCopiedUrlInNewTab: ["Open the clipboard's URL in a new tab", { repeatLimit: 20 }]

enterInsertMode: ["Enter insert mode", { noRepeat: true }]
passNextKey: ["Pass the next key to the page"]
Expand Down
9 changes: 9 additions & 0 deletions content_scripts/vimium_frontend.coffee
Expand Up @@ -376,6 +376,15 @@ extend window,
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 }

enterInsertMode: ->
# If a focusable element receives the focus, then we exit and leave the permanently-installed insert-mode
# instance to take over.
Expand Down

0 comments on commit 6659501

Please sign in to comment.