gothfox/Tiny-Tiny-RSS — pull request #110 by dandersson (2013-03-31 20:32:32+00:00)
Title: Function+hotkey to open article in background tab

*Works on*: Chrome, Opera
*Doesn't seem to work on*: Firefox (only tested via [Iceweasel](http://en.wikipedia.org/wiki/Mozilla_Corporation_software_rebranded_by_the_Debian_project) 10.0.2)
*Not tested*: everything else.

Inspired by [this SO answer](http://stackoverflow.com/a/11389138/445621).

This creates a new \ element to the target and then simulates a Ctrl-click performed on it to trigger the "Open in background" action in the browser. It is hackish in nature, and doesn't work on all browsers. Perhaps there is a better solution available, perhaps not. It seems to work flawlessly in Chrome/Opera, though (better than I thought it would).

The reason I write this despite the problems of the function is that it is really neat functionality to have, and I'll personally use it extensively. If it can serve as a base for an even better solution: great. If deemed unwanted: I'll just keep it to my own installation. Since it is confined in its own function, it doesn't interfere with the application anyway.

Perhaps it could be included as a "hidden" function for those who want it, hiding it by removing the default Shift-o hotkey I included in the commit (not advertising somewhat "broken" functionality). Perhaps even two browser dependent functions, in all its horribleness. As long as the browsers in question won't change their default interface it would hopefully not need continuous maintenance.

Improvement ideas very much welcome.

(I also could only test this on a 1.7.5 installation and not trunk, so I'm crossing my fingers that I didn't mess up the commit.)