Skip to content

Commit

Permalink
Load zxcvbn when component is mounted. Fixes seethroughdev#27.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Barth committed Jan 20, 2016
1 parent f3bfef2 commit f241c71
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions demo/demo.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/demo.bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/style.css

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions lib/react-ux-password-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@ return /******/ (function(modules) { // webpackBootstrap

// snippet to async load zxcvbn if enabled
(function () {
var a;a = function () {
var a, b;b = document.createElement("script");b.src = zxcvbnSrc;b.type = "text/javascript";b.async = !0;a = document.getElementsByTagName("head")[0];return a.parentNode.insertBefore(b, a);
};null != window.attachEvent ? window.attachEvent("onload", a) : window.addEventListener("load", a, !1);
var a, b;b = document.createElement("script");b.src = zxcvbnSrc;b.type = "text/javascript";b.async = !0;a = document.getElementsByTagName("head")[0];a.parentNode.insertBefore(b, a);
}).call(this);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/react-ux-password-field.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ var InputPassword = React.createClass({

zxcvbnSrc = this.props.zxcvbn !== 'debug' ? this.props.zxcvbn : config.zxcvbnSrc;

// snippet to async load zxcvbn if enabled
(function(){var a;a=function(){var a,b;b=document.createElement("script");b.src=zxcvbnSrc;b.type="text/javascript";b.async=!0;a=document.getElementsByTagName("head")[0];return a.parentNode.insertBefore(b,a)};null!=window.attachEvent?window.attachEvent("onload",a):window.addEventListener("load",a,!1)}).call(this);
// snippet to async load zxcvbn if enabled
(function(){
var a,b;b=document.createElement("script");b.src=zxcvbnSrc;b.type="text/javascript";b.async=!0;a=document.getElementsByTagName("head")[0];a.parentNode.insertBefore(b,a);
}).call(this);
}

// set debouncer for password
Expand Down

0 comments on commit f241c71

Please sign in to comment.