Keyboard shortcut to open windows in the background

Can we get a keyboard shortcut to open the story in a new window in the background? Like ‘o’ but, well, backgrounded? I’d suggest shift-o.


It already does try to open in the background. Here’s the relevant code:[‘story_permalink’], ‘_blank’);

What that means is that it is opening a new _blank window, then trying to focus back on NewsBlur, so effectively the window is in the background. The real answer is to change your browser settings so that new tabs open in the background. This is easy to do in Chrome, Safari, and Firefox. If you’re not on one of these, I’m not really sure how to best make this happen.

I have Firefox 7/8 set up on several different machines, with new windows set to open as tabs, and new tabs set to open in the background…

…and I can assure you that I am getting new tabs from NewsBlur opening in the foreground – both from the ‘o’ shortcut as well as when I click on links. I get switched to the new tab and watch as it loads.

Here is what I did to make Firefox open new tabs in the background:…

“In order to force all links that open in a new window to load in a background tab, type about:config in the URL bar and change browser.tabs.loadDivertedInBackground to true.”

That’s it!! Thank you so much!

I decided I didn’t like having the “loadDivertedInBackground” functionality to be the default everywhere on the web… so I whipped up a little Greasemonkey script that accomplishes this functionality. It apparently can only be accomplished through Greasemonkey or the like; by default Firefox frowns on opening tabs/windows in the background and does its best to disable Javascript that seems to be trying to do that.

// ==UserScript==   
// @name NewsBlur BG Open   
// @namespace   
// @description Open links from Newsblur In Background   
// @include\*   
// @include\*   
// ==/UserScript==   
function linkKey(ev){   
if(/input|textarea/.test( return;   
var k = String.fromCharCode(ev.keyCode ||ev.which);   
if(k == "O"){   
var link = document.querySelectorAll("div.story.selected a.story\_title");   
if (link.length \> 0) {   
document.addEventListener('keypress', linkKey, true);   

If you change the ‘k == “O”’ (which is a shift-o, not a number 0) line you can remap it to whatever key you want.

google reader would open links in background tabs, I wonder how they do it

By giving you a link instead of opening the link with JS. This is the one thing that really ticks me off about NewsBlur. None of the workarounds are satisfactory.

How about using code similar to this?

function openNewBackgroundTab(){
var a = document.createElement(“a”);
a.href = “”;
var 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);

Just want to add a me-too to this thread. The ctrl-V open-in-background is my most used and missed feature from reader.

1 Like