Skip to content

Conversation

@gaynetdinov
Copy link

Hello.

I have some feeds which stories in general provide only title, without any useful data in body, for example posts from LJ that contain embedded youtube clip under a lj-cut. I'd like to open such stories in background tabs and read/watch them later one-by-one after I finish reading other stories in stringer.
Currently to open story in background tab I need two clicks: first, to open story by clicking on it and the second click on 'Open in tab' icon in the right bottom corner of the story. But I'd like to open such stories in the background tabs without opening stories on stringer(since such stories doesn't have any useful data in body).

Does this idea make sense for you?
Thanks.

@swanson
Copy link
Collaborator

swanson commented Jul 17, 2013

Is this the same functionality as using n/p and v?

Last I checked there are some browser/platform issues using e.metaKey in jQuery that make me hesitate slightly.

@gaynetdinov
Copy link
Author

Is this the same functionality as using n/p and v?

No, it's not, since v opens story in foreground/active tab and my point is to open stories in background in one click.

Last I checked there are some browser/platform issues using e.metaKey in jQuery that make me hesitate slightly.

I'll try to find/read something about that.

Also I think that

if (e.metaKey)

could be replaced with

if (e.metaKey || e.which == 2)

to consider middle mouse click.

@gaynetdinov
Copy link
Author

Click + cmd works in Safari, Chrome and Opera, but doesn't work in Firefox because Firefox doesn't allow to open tabs in background via js(or I didn't find how), so in Firefox even when you click with cmd, pages are opened in foreground tabs. Tested on my mac.

@swanson
Copy link
Collaborator

swanson commented Jul 23, 2013

Looks good - would like to try to get some tests for this behavior: https://github.com/swanson/stringer/blob/master/spec/javascript/spec/views/story_view_spec.js

Could you take a stab @gaynetdinov?

@gaynetdinov
Copy link
Author

I didn't find better idea than to stub model.toggle() method and thus determine whether we simply showed a story or a story was opened in background tab.

@swanson
Copy link
Collaborator

swanson commented Jul 29, 2013

Thanks - works for me as well.

swanson pushed a commit that referenced this pull request Jul 29, 2013
Open story in background tab when clicked with metaKey.
@swanson swanson merged commit 330e288 into stringer-rss:master Jul 29, 2013
@swanson swanson mentioned this pull request Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants