Closed adoxa closed 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.
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.
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.
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%.
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.)
I'll post the 100% on interruption as a new issue.
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:
Date.now()
rather thannew Date()
&.getTime()
;slice
to space-pad rather than a loop;round
followed bytoFixed
was redundant, andtoFixed
is already a string;onStatusChange
&onSecurityChange
, fwiw;timeString
, it can be made fromslimTimeString
.