Skip to content

Instantly share code, notes, and snippets.

@satyr
Last active December 16, 2015 21:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satyr/5502165 to your computer and use it in GitHub Desktop.
Save satyr/5502165 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name (always) Open Bookmarks in New Tabs
// @compat Firefox 20+
// @author satyr
// @license X
// @include main
// ==/UserScript==
PlacesUIUtils.openNodeWithEvent =
function PUIU_openNodeWithEventInNewTab(node, event, view) {
var where =
PlacesUtils.nodeIsBookmark(node) &&
PlacesUtils.annotations
.itemHasAnnotation(node.itemId, this.LOAD_IN_SIDEBAR_ANNO)
|| node.uri.startsWith('javascript:')
? 'current'
: event.button
? 'tabshifted'
: 'tab'
this._openNodeIn(node, where, view.ownerWindow)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment