Seditio Source
Root |
./othercms/xenForo 2.2.8/js/xf/password_box.min.js
'use strict';!function(d,e,f,g){XF.PasswordStrength=XF.Element.newHandler({options:{},$password:null,$meter:null,$meterText:null,language:{},init:function(){this.$password=this.$target.find(".js-password");this.$meter=this.$target.find(".js-strengthMeter");this.$meterText=this.$target.find(".js-strengthText");this.language=d.parseJSON(d(".js-zxcvbnLanguage").first().html())||{};this.$password.on("input",XF.proxy(this,"input"))},input:function(){var b=this.$password.val(),a=zxcvbn(b),c=a.score;a=a.feedback.warning||
"";b?(b=20*(c+1),4<=c?a="This is a very strong password":3<=c?a="This is a reasonably strong password":a||(a="The chosen password could be stronger")):(a="Entering a password is required",b=0);this.$meter.val(b);this.$meterText.text(this.language[a]||"")}});XF.Element.register("password-hide-show","XF.PasswordHideShow");XF.Element.register("password-strength","XF.PasswordStrength")}(jQuery,window,document);