Last active
October 10, 2015 10:57
-
-
Save marcusandre/290b7fe7de72fa963fa6 to your computer and use it in GitHub Desktop.
Quickly open a link in a new tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openTab (url, method) { | |
var m = method || '_blank' | |
var w = window.open(url, m) | |
w.focus() | |
} | |
openTab('https://google.com/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
remember: browser assumes a pop up.