Skip to content

Commit

Permalink
Middle clicking on a bookmark now opens it in the background.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis.gid committed Jul 3, 2010
1 parent fd04a47 commit 0413e6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ var PostList = new Class({
var anchor = new Element('a', {
'text': item.title,
'title': item.tags.join(', ') + '\n' + postURL,
'href': "javascript:chrome.tabs.create({url: '" + postURL + "'});close();"
'href': '#'
});
anchor.addEventListener('click', function(e){
chrome.tabs.create({url: postURL, selected: !(e.button == 1 || e.ctrlKey)});
e.preventDefault();
});

var edit = new Element('span', {'class': 'edit', 'title': 'edit this bookmark'});
edit.addEventListener('click', bookmarkURL.pass([postURL, item.title]));

Expand Down

0 comments on commit 0413e6b

Please sign in to comment.