Merge pull request #11429 from nextcloud/feature/11033/bump_strengthify

Bump strengthify
This commit is contained in:
Morris Jobke 2018-09-28 14:14:26 +02:00 committed by GitHub
commit 3182b8b063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "strengthify", "name": "strengthify",
"version": "0.5.3", "version": "0.5.4",
"homepage": "https://github.com/MorrisJobke/strengthify", "homepage": "https://github.com/MorrisJobke/strengthify",
"authors": [ "authors": [
"Eve Ragins <eve.ragins@eve-corp.com", "Eve Ragins <eve.ragins@eve-corp.com",
@ -9,11 +9,11 @@
"description": "Combine jQuery and zxcvbn to create a password strength meter.", "description": "Combine jQuery and zxcvbn to create a password strength meter.",
"main": "jquery.strengthify.js", "main": "jquery.strengthify.js",
"license": "MIT", "license": "MIT",
"_release": "0.5.3", "_release": "0.5.4",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "0.5.3", "tag": "0.5.4",
"commit": "a97e861762ccb17ce5f51d5c608b5d9e42732ae3" "commit": "3d9759958558752d0c115774d2b0bc34fac7e31b"
}, },
"_source": "https://github.com/MorrisJobke/strengthify.git", "_source": "https://github.com/MorrisJobke/strengthify.git",
"_target": "^0.5.3", "_target": "^0.5.3",

View File

@ -2,7 +2,7 @@
* Strengthify - show the weakness of a password (uses zxcvbn for this) * Strengthify - show the weakness of a password (uses zxcvbn for this)
* https://github.com/MorrisJobke/strengthify * https://github.com/MorrisJobke/strengthify
* *
* Version: 0.5.2 * Version: 0.5.4
* Author: Morris Jobke (github.com/MorrisJobke) - original * Author: Morris Jobke (github.com/MorrisJobke) - original
* Eve Ragins @ Eve Corp (github.com/eve-corp) * Eve Ragins @ Eve Corp (github.com/eve-corp)
* *
@ -90,6 +90,10 @@
'"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')"' '"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')"'
); );
if (options.onResult) {
options.onResult(result);
}
// style strengthify bar // style strengthify bar
// possible scores: 0-4 // possible scores: 0-4
switch (result.score) { switch (result.score) {
@ -203,13 +207,11 @@
$elem.parent().on('scroll', drawSelf); $elem.parent().on('scroll', drawSelf);
$.ajax({ var script = document.createElement("script");
cache: true, script.src = options.zxcvbn;
url: options.zxcvbn document.head.appendChild(script);
}).done(function(content) {
eval(content);
$elem.bind('keyup input change', drawSelf); $elem.bind('keyup input change', drawSelf);
});
}; };
init.call(this); init.call(this);

View File

@ -1,7 +1,7 @@
/** /**
* Strengthify - show the weakness of a password (uses zxcvbn for this) * Strengthify - show the weakness of a password (uses zxcvbn for this)
* https://github.com/MorrisJobke/strengthify * https://github.com/MorrisJobke/strengthify
* Version: 0.5.2 * Version: 0.5.4
* License: The MIT License (MIT) * License: The MIT License (MIT)
* Copyright (c) 2013-2016 Morris Jobke <morris.jobke@gmail.com> * Copyright (c) 2013-2016 Morris Jobke <morris.jobke@gmail.com>
*/ */