Open new browser tabs without focus using CoffeeScript

Solution 1:

This answer details what seems to be a legitimate way to open a tab in the background. Converting the answer to CoffeeScript, I get:

openNewBackgroundTab = ->
  a = document.createElement("a")
  a.href = "http://www.google.com/"
  evt = document.createEvent("MouseEvents")

  #the tenth parameter of initMouseEvent sets ctrl key
  evt.initMouseEvent "click", true, true, window, 0, 0, 0, 0, 0, true, false, false, false, 0, null
  a.dispatchEvent evt
  return