Update SweetAlert.js

You should use angular $window service instead of window.