JS size detection