winWidth modification

Reduced vanilla javascript use