mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Merge pull request #744 from zerodogg/linux-webkit-background-workaround
Added a workaround for Linux webkit browsers
This commit is contained in:
commit
cc50693b18
1 changed files with 11 additions and 2 deletions
|
@ -123,7 +123,16 @@ NEWSBLUR.Models.Story = Backbone.Model.extend({
|
|||
open_story_in_new_tab: function(background) {
|
||||
this.mark_read({skip_delay: true});
|
||||
|
||||
if (background && !$.browser.mozilla) {
|
||||
// A «Safari» browser on Linux is an impossibility, and thus we're actually
|
||||
// on a WebKit-based browser (WebKitGTK or QTWebKit). These can't handle
|
||||
// background tabs. Work around it by disabling backgrounding if we
|
||||
// think we're on Safari and we're also on X11 or Linux
|
||||
if($.browser.safari && /(\(X11|Linux)/.test(navigator.userAgent))
|
||||
{
|
||||
background = false;
|
||||
}
|
||||
|
||||
if (background && !$.browser.mozilla && trueSafari) {
|
||||
var anchor, event;
|
||||
|
||||
anchor = document.createElement("a");
|
||||
|
@ -507,4 +516,4 @@ NEWSBLUR.Collections.Stories = Backbone.Collection.extend({
|
|||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue