/wp-includes/js/zxcvbn-async.js

https://bitbucket.org/skyarch-iijima/wordpress · JavaScript · 18 lines · 16 code · 1 blank · 1 comment · 3 complexity · 97a79e96a815b200139356055d752333 MD5 · raw file

  1. /* global _zxcvbnSettings */
  2. (function() {
  3. var async_load = function() {
  4. var first, s;
  5. s = document.createElement('script');
  6. s.src = _zxcvbnSettings.src;
  7. s.type = 'text/javascript';
  8. s.async = true;
  9. first = document.getElementsByTagName('script')[0];
  10. return first.parentNode.insertBefore(s, first);
  11. };
  12. if (window.attachEvent != null) {
  13. window.attachEvent('onload', async_load);
  14. } else {
  15. window.addEventListener('load', async_load, false);
  16. }
  17. }).call(this);