From 1aa449fcc79e0f3b612918b1cebd39196a0f3de9 Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 16 Dec 2015 23:54:36 +0100 Subject: [PATCH] Fixed error during the registration process. --- public/content/data/yuuno/js/yuuno.js | 8 ++++---- public/content/data/yuuno/js/yuuno.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/content/data/yuuno/js/yuuno.js b/public/content/data/yuuno/js/yuuno.js index 51b5c37..158ab9a 100644 --- a/public/content/data/yuuno/js/yuuno.js +++ b/public/content/data/yuuno/js/yuuno.js @@ -356,17 +356,17 @@ function registerVarCheck(id, mode, option) { switch (mode) { case 'confirmpw': option = document.getElementById(option); - check = input.getAttribute('value') === option.value; + check = input.value === option.value; break; case 'password': - check = checkPwdEntropy(input.getAttribute('value')); + check = checkPwdEntropy(input.value); break; case 'email': - check = Sakura.validateEmail(input.getAttribute('value')); + check = Sakura.validateEmail(input.value); break; case 'username': default: - check = Sakura.stringLength(input.getAttribute('value'), sakuraVars.minUserLen, sakuraVars.maxUserLen); + check = Sakura.stringLength(input.value, sakuraVars.minUserLen, sakuraVars.maxUserLen); break; } if (input.className.indexOf(check ? 'green' : 'red') < 0) { diff --git a/public/content/data/yuuno/js/yuuno.ts b/public/content/data/yuuno/js/yuuno.ts index f68ecc3..3fecd39 100644 --- a/public/content/data/yuuno/js/yuuno.ts +++ b/public/content/data/yuuno/js/yuuno.ts @@ -430,27 +430,27 @@ function checkPwdEntropy(pwd: string): boolean { // Check registration variables function registerVarCheck(id: string, mode: string, option: any = null): void { // Get the element we're working with - var input: HTMLElement = document.getElementById(id); + var input: any = document.getElementById(id); var check: boolean = null; // Use the proper mode switch (mode) { case 'confirmpw': option = document.getElementById(option); - check = input.getAttribute('value') === option.value; + check = input.value === option.value; break; case 'password': - check = checkPwdEntropy(input.getAttribute('value')); + check = checkPwdEntropy(input.value); break; case 'email': - check = Sakura.validateEmail(input.getAttribute('value')); + check = Sakura.validateEmail(input.value); break; case 'username': default: - check = Sakura.stringLength(input.getAttribute('value'), sakuraVars.minUserLen, sakuraVars.maxUserLen); + check = Sakura.stringLength(input.value, sakuraVars.minUserLen, sakuraVars.maxUserLen); break; }