wp/wp-includes/js/zxcvbn-async.js
author ymh <ymh.work@gmail.com>
Mon, 08 Sep 2025 19:44:41 +0200
changeset 23 417f20492bf7
parent 9 177826044cd9
permissions -rw-r--r--
Update Docker configuration and plugin versions - Upgrade MariaDB from 10.6 to 11 with auto-upgrade support - Add WordPress debug environment variable to FPM container - Update PHP-FPM Dockerfile base image - Update Include Mastodon Feed plugin with bug fixes and improvements - Update Portfolio plugin (v2.58) with latest translations and demo data enhancements - Remove old README.md from Mastodon Feed plugin 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     1
/**
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     2
 * @output wp-includes/js/zxcvbn-async.js
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     3
 */
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     4
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
     5
/* global _zxcvbnSettings */
9
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     6
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     7
/**
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     8
 * Loads zxcvbn asynchronously by inserting an async script tag before the first
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
     9
 * script tag on the page.
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    10
 *
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    11
 * This makes sure zxcvbn isn't blocking loading the page as it is a big
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    12
 * library. The source for zxcvbn is read from the _zxcvbnSettings global.
177826044cd9 upgrade wordpress to 5.2.3
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    13
 */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
(function() {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
  var async_load = function() {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    var first, s;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
    s = document.createElement('script');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    s.src = _zxcvbnSettings.src;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    s.type = 'text/javascript';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    s.async = true;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    first = document.getElementsByTagName('script')[0];
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
    return first.parentNode.insertBefore(s, first);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
  };
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
  if (window.attachEvent != null) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    window.attachEvent('onload', async_load);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
  } else {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    window.addEventListener('load', async_load, false);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
  }
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
}).call(this);