Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

major rewrite, fixes #16 and #17 #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

major rewrite, fixes #16 and #17 #19

wants to merge 3 commits into from

Conversation

rindeal
Copy link

@rindeal rindeal commented Jul 25, 2015

  • feature exclude pinned tabs #17 is not complete
    • needs to set up hooks to update counters on pinned/unpinned events
  • code tested on FF 39.0

- feature #17 is not complete
    - needs to set up hooks to update counters on pinned/unpinned events
- code tested on FF 39.0
var maxPrivateBrowsing = simplePrefs.prefs.maxPrivateBrowsing;
var maxOpenInNextWindow = simplePrefs.prefs.maxOpenInNextWindow;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the spaces (or tabs)? I use tabs so let's stick to that 😄

@robsonsobral
Copy link

Hi!

I tested on 41.0a and the tab moved to the new window isn't being focused. Doesn't the window need to be activated too? Or is it a Firefox Alpha bug?

@rindeal
Copy link
Author

rindeal commented Jul 28, 2015

It does and it is not. I've also noticed this behaviour. Also there seems to be a bug which causes the counter to reach one tab above limit. I don't have enough time to dig into it now, but I'll try it this weekend.

@robsonsobral
Copy link

Hi!

I'm testing and... It's annoying to have to wait until the page to completely load before the tab to be "moved". However, I can't figure anything different from a loop on setTimeout, but I'm afraid of performance issues.

@rindeal
Copy link
Author

rindeal commented Aug 1, 2015

Hi,

docs clearly say that URL of tab is known only after the tab entered "ready" state. And as I stated in comments in the code, unless you want to implement the low level stuff to enable true moving of tabs, this is the only way of doing it, AFAIK (however, I don't know too far in this field).

BTW, which loop do you mean @robsonsobral?

@robsonsobral
Copy link

I'm sorry! I mean setInterval.

I was thinking on to use the open() event and keep checking until tab.readyState == "interactive", instead of wait until it's complete.

@rindeal
Copy link
Author

rindeal commented Aug 2, 2015

Wow, there was an error in Matrix! I'd swear that yesterday the sentence was Once a tab's readyState has entered "complete", you can .... All right, then I think polling interval of ~300-500ms shouldn't have much impact on performance.

@robsonsobral
Copy link

Hi! I've testing this branch and found a bug. If the new tab is just a file, like domain.com/file.jpg, it isn't moved.

Maybe it's best to use setInterval until the URl of the tab become available.

@robsonsobral
Copy link

One more issue: the moved tab isn't integrated into history. It doesn't appears on "recent closed tabs" and sometimes just doesn't keep its url after reload.

It looks like this idea isn't easy to implemented after all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants