Update warning.js

now script is working in firefox