Update script.js

Added functionality to pass window dimensions into html