kustodian / extended-statusbar

Firefox addon which adds a statusbar with speed, percentage, time and loaded size (similar to Opera's one)
https://addons.mozilla.org/en-US/firefox/addon/extended-statusbar/
GNU General Public License v3.0
18 stars 6 forks source link

Hide status for a blank tab; right-align speed/percentage/time; general changes. #8

Closed adoxa closed 10 years ago

adoxa commented 10 years ago

When creating a new blank tab, the status of the current tab remained.

Since the speed, percentage and time values always use the same number of decimals, make them right-aligned to stop them from shifting at all.

And just some minor stuff:

  1. use Date.now() rather than new Date() & .getTime();
  2. use slice to space-pad rather than a loop;
  3. round followed by toFixed was redundant, and toFixed is already a string;
  4. add the extra parameter to onStatusChange & onSecurityChange, fwiw;
  5. there's no day, so don't mod 24 the hours;
  6. no need for timeString, it can be made from slimTimeString.
sipertruk commented 10 years ago

The speed start from 0 not 0.00 maybe this could change. I think align="center" is needed anyway along the "pack" attribute because the applied default seems to be align="top". If a bigger height is set for the toolbar using css it shows.

adoxa commented 10 years ago

I just discovered the alignment issue when I removed height (since that gave the status bar different heights depending if the stats were displayed or not). As the commit says, I've also added the decimals when initializing the speed.

If you stop a page loading before it's complete, the percentage should remain as it is, not just get set to 100.

sipertruk commented 10 years ago

I'm ok with everything but the 100% on stop because :

As a result on pages with blocked content (like with adblock) it never reach 100%, my opinion is it should. When the button stop is hit or the connection is reset for an unknown reason there's a ProgressChange event kicking with values resulting in 100% completion so in the cases where it should be useful it's not.

I'm not the one that originally put it like that but there's a matter of discussion.

kustodian commented 10 years ago

I wouldn't mind that the percent stops at the value when a user stops page loading or if there is a connection error, but in all other cases it should always reach 100%.

adoxa commented 10 years ago

I noticed that when I stopped it went to 100 anyway, so yeah, I've put it back. (Indeed, just viewing this page shows as 98%, yet I don't notice anything missing.)

sipertruk commented 10 years ago

I'll post the 100% on interruption as a new issue.