diff --git a/resources/gorilla-repl-client/js/commandProcessor.js b/resources/gorilla-repl-client/js/commandProcessor.js index 8dda7c37..97a1766c 100644 --- a/resources/gorilla-repl-client/js/commandProcessor.js +++ b/resources/gorilla-repl-client/js/commandProcessor.js @@ -276,5 +276,14 @@ commandList = [ action: function () { eventBus.trigger("worksheet:reindent"); } + }, + { + name: "command:app:open-new-tab", + desc: "Open current link in new tab.", + showInMenu: true, + kb: combo('t', 'n'), + action: function () { + eventBus.trigger("app:open-new-tab"); + } } ]; diff --git a/resources/gorilla-repl-client/js/main.js b/resources/gorilla-repl-client/js/main.js index 62dbe67c..ad3e26e4 100644 --- a/resources/gorilla-repl-client/js/main.js +++ b/resources/gorilla-repl-client/js/main.js @@ -260,6 +260,10 @@ var app = function () { self.docViewer.hide(); }); + eventBus.on("app:open-new-tab", function (e, d) { + window.open(window.location.href); + }); + return self; };