Update script.js

Set it with eventListener